Default_scope without a block is deprecated in Rails 4
This commit is contained in:
parent
62da375f0c
commit
2ded14b548
|
@ -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