Order the tracks by ID

This commit is contained in:
Petko Bordjukov 2014-09-06 19:04:22 +03:00
parent 8b472d4536
commit fbea343c10
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class Conference < ActiveRecord::Base
translates :title, :description translates :title, :description
has_many :tracks has_many :tracks, -> { order('id asc') }
has_many :events, through: :tracks has_many :events, through: :tracks
scope :future, -> { where('start_date >= ?', Date.today).order('start_date ASC') } scope :future, -> { where('start_date >= ?', Date.today).order('start_date ASC') }