class Location::YearGroup
Schema Information
Table name: location_year_groups
id :bigint not null, primary key academic_year :integer not null source :integer not null value :integer not null created_at :datetime not null updated_at :datetime not null location_id :bigint not null
Indexes
idx_on_location_id_academic_year_value_d553b03752 (location_id,academic_year,value) UNIQUE index_location_year_groups_on_location_id (location_id)
Foreign Keys
fk_rails_... (location_id => locations.id) ON DELETE => cascade
Constants
- DEFAULT_VALUE_RANGE
Public Instance Methods
Source
# File app/models/location/year_group.rb, line 48 def birth_academic_year = value.to_birth_academic_year(academic_year:) def programmes location_programme_year_groups.map(&:programme).sort.uniq end end
Source
# File app/models/location/year_group.rb, line 50 def programmes location_programme_year_groups.map(&:programme).sort.uniq end