fix: enum format in question.rb

mciea-main
Nelson Jovel 1 year ago
parent 9b9da5f61b
commit 6cbf7b9f2f

@ -25,7 +25,7 @@ module Legacy
scope :for_category, ->(category) { where(category:) } scope :for_category, ->(category) { where(category:) }
scope :created_in, ->(year) { where("extract(year from #{table_name}.created_at) = ?", year) } scope :created_in, ->(year) { where("extract(year from #{table_name}.created_at) = ?", year) }
enum target_group: %i[unknown for_students for_teachers for_parents] enum :target_group, %i[unknown for_students for_teachers for_parents]
def source def source
target_group.gsub("for_", "") target_group.gsub("for_", "")

Loading…
Cancel
Save