ecoffee/app/models/instance.rb

6 lines
188 B
Ruby

class Instance < ApplicationRecord
has_many :pops, dependent: :destroy
has_many :fairies, dependent: :destroy
validates :zone, inclusion: { in: %w[anemos pagos pyros hydatos] }
end