aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorNick Quaranto <nick@quaran.to>2013-05-01 11:41:54 -0700
committerNick Quaranto <nick@quaran.to>2013-05-01 11:41:54 -0700
commitb014b4e8cf22f73e155c93b83308805744a13afc (patch)
tree898f24d51e58039d2104616f8d1e01c346a9eb36 /guides
parent7ead1d81431b2c2c0366347b7bfdf9a329b6f934 (diff)
downloadrails-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.md2
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')