Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed up bug reported by Darktatka in regards to :joins outside of la…

…mbda.
  • Loading branch information...
commit a9b5655948b12bcb3d71bb2fd2fd5fac6c918c7e 1 parent 4cf3d4d
@radar radar authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/guides/source/active_record_querying.textile
View
4 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>
Please sign in to comment.
Something went wrong with that request. Please try again.