Redmine-Jobs/app/models/job_category.rb

16 lines
358 B
Ruby
Raw Normal View History

2023-11-30 19:08:55 +00:00
# frozen_string_literal: true
class JobCategory < Enumeration
has_many :jobs, foreign_key: :category_id
OptionName = :enumeration_job_category
scope :support, -> { where(name: 'Support').first }
scope :retainer, -> { where(name: 'Retainer').first }
scope :sprints, -> { where(name: 'Sprints').first }
2023-11-30 19:08:55 +00:00
def option_name
OptionName
end
end