Use Rails 4 active record syntax
This commit is contained in:
parent
e66a35e2c1
commit
9e719185f6
|
@ -6,7 +6,7 @@ ActiveRecord::Base.establish_connection(
|
|||
)
|
||||
|
||||
class Person < ActiveRecord::Base
|
||||
default_scope { order('id DESC') }
|
||||
default_scope { order(id: :desc) }
|
||||
belongs_to :parent, class_name: 'Person', foreign_key: :parent_id
|
||||
has_many :children, class_name: 'Person', foreign_key: :parent_id
|
||||
has_many :articles
|
||||
|
|
Loading…
Reference in New Issue