aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2009-02-07 13:15:10 +1000
committerRyan Bigg <radarlistener@gmail.com>2009-02-07 13:15:10 +1000
commita9b5655948b12bcb3d71bb2fd2fd5fac6c918c7e (patch)
treef46feb56e59b848f21ee9e5523d01971d1c5e105 /railties/guides
parent4cf3d4d9d5b8c8c129c64eaf3788315bc5c5dacf (diff)
downloadrails-a9b5655948b12bcb3d71bb2fd2fd5fac6c918c7e.tar.gz
rails-a9b5655948b12bcb3d71bb2fd2fd5fac6c918c7e.tar.bz2
rails-a9b5655948b12bcb3d71bb2fd2fd5fac6c918c7e.zip
Fixed up bug reported by Darktatka in regards to :joins outside of lambda.
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/active_record_querying.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile
index 99cf2affd8..49474054d6 100644
--- a/railties/guides/source/active_record_querying.textile
+++ b/railties/guides/source/active_record_querying.textile
@@ -546,8 +546,8 @@ In a named scope you can use +:include+ and +:joins+ options just like in +find+
<ruby>
class Client < ActiveRecord::Base
- named_scope :active_within_2_weeks, :joins => :order,
- lambda { { :conditions => ["orders.created_at > ?", 2.weeks.ago] } }
+ named_scope :active_within_2_weeks
+ lambda { { :joins => :order, :conditions => ["orders.created_at > ?", 2.weeks.ago] } }
end
</ruby>