fix: enum format in question.rb

rpp-main
Nelson Jovel 1 year ago
parent 6ef0c1ef0a
commit 0c918fa3d3

@ -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