diff options
author | Nick Quaranto <nick@quaran.to> | 2013-05-01 11:41:54 -0700 |
---|---|---|
committer | Nick Quaranto <nick@quaran.to> | 2013-05-01 11:41:54 -0700 |
commit | b014b4e8cf22f73e155c93b83308805744a13afc (patch) | |
tree | 898f24d51e58039d2104616f8d1e01c346a9eb36 /guides | |
parent | 7ead1d81431b2c2c0366347b7bfdf9a329b6f934 (diff) | |
download | rails-b014b4e8cf22f73e155c93b83308805744a13afc.tar.gz rails-b014b4e8cf22f73e155c93b83308805744a13afc.tar.bz2 rails-b014b4e8cf22f73e155c93b83308805744a13afc.zip |
Rails 4 has deprecated :order in has_many to use a lambda instead, update the guide accordingly
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_record_querying.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 80eec428c1..19b214f114 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -732,7 +732,7 @@ The `reorder` method overrides the default scope order. For example: class Post < ActiveRecord::Base .. .. - has_many :comments, order: 'posted_at DESC' + has_many :comments, -> { order('posted_at DESC') } end Post.find(10).comments.reorder('name') |