|
|
|
@ -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_', '')
|
|
|
|
|