diff options
Diffstat (limited to 'railties')
-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> |