docbrown/app/models/job_opportunity.rb
2018-02-28 16:11:08 -05:00

14 lines
441 B
Ruby

class JobOpportunity < ApplicationRecord
has_many :articles
validates :remoteness,
inclusion: { in: %w(on_premise fully_remote remote_optional on_premise_flexible) }
def remoteness_in_words
phrases = {
"on_premise" => "In Office",
"fully_remote" => "Fully Remote",
"remote_optional" => "Remote Optional",
"on_premise_flexible" => "Mostly in Office but Flexible",
}
phrases[remoteness]
end
end