Default_scope without a block is deprecated in Rails 4

This commit is contained in:
jonatack 2013-07-04 16:24:17 +02:00
parent 62da375f0c
commit 2ded14b548
1 changed files with 1 additions and 1 deletions

View File

@ -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