diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2009-02-07 13:15:10 +1000 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2009-02-07 13:15:10 +1000 |
commit | a9b5655948b12bcb3d71bb2fd2fd5fac6c918c7e (patch) | |
tree | f46feb56e59b848f21ee9e5523d01971d1c5e105 /railties/guides | |
parent | 4cf3d4d9d5b8c8c129c64eaf3788315bc5c5dacf (diff) | |
download | rails-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.textile | 4 |
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> |