Merge pull request #1094 from benjamin-guibert/patch-1

Replace has_many deprecated ordering
This commit is contained in:
Rico Sta. Cruz 2019-12-18 13:44:09 +11:00 committed by GitHub
commit b78de6b210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -247,11 +247,11 @@ Associations
belongs_to :parent, :foreign_key => 'parent_id' class_name: 'Folder' belongs_to :parent, :foreign_key => 'parent_id' class_name: 'Folder'
has_many :folders, :foreign_key => 'parent_id', class_name: 'Folder' has_many :folders, :foreign_key => 'parent_id', class_name: 'Folder'
has_many :comments, :order => "posted_on" has_many :comments, -> { order('posted_on DESC') }
has_many :comments, :include => :author has_many :comments, :include => :author
has_many :people, :class_name => "Person" has_many :people, :class_name => "Person"
has_many :people, :conditions => "deleted = 0" has_many :people, :conditions => "deleted = 0"
has_many :tracks, :order => "position" has_many :tracks, -> { order(:position) }
has_many :comments, :dependent => :nullify has_many :comments, :dependent => :nullify
has_many :comments, :dependent => :destroy has_many :comments, :dependent => :destroy
has_many :tags, :as => :taggable has_many :tags, :as => :taggable