Use Rails 4 active record syntax

This commit is contained in:
jonatack 2013-08-12 10:56:20 +02:00
parent e66a35e2c1
commit 9e719185f6
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