docbrown/app/models/job_opportunity.rb
cyrillefr 4fd66372dc Enable Layout/AlignParameters (#2340)
Check if the parameters on a multi-line method call or definition are aligned.

Resolves: #2021
2019-04-08 18:47:34 -04:00

14 lines
448 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