diff options
author | Glenn Vanderburg <glv@vanderburg.org> | 2011-01-28 18:16:44 -0600 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-01 12:38:58 -0200 |
commit | 6bd9fac1e301d57765073e1f7a17e46972428205 (patch) | |
tree | 8514c120608bbace9eb9230a064a0c1eebc6e1a7 /activerecord/test/models/comment.rb | |
parent | 817e37013610c8e8866197594d5e408b4d5daec5 (diff) | |
download | rails-6bd9fac1e301d57765073e1f7a17e46972428205.tar.gz rails-6bd9fac1e301d57765073e1f7a17e46972428205.tar.bz2 rails-6bd9fac1e301d57765073e1f7a17e46972428205.zip |
Propagate association extensions to scopes called on the association.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activerecord/test/models/comment.rb')
-rw-r--r-- | activerecord/test/models/comment.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb index a9aa0afced..ff533717cc 100644 --- a/activerecord/test/models/comment.rb +++ b/activerecord/test/models/comment.rb @@ -1,6 +1,7 @@ class Comment < ActiveRecord::Base scope :limit_by, lambda {|l| limit(l) } scope :containing_the_letter_e, :conditions => "comments.body LIKE '%e%'" + scope :not_again, where("comments.body NOT LIKE '%again%'") scope :for_first_post, :conditions => { :post_id => 1 } scope :for_first_author, :joins => :post, |