diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-01-24 17:54:10 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-01-24 17:54:10 +0000 |
commit | fe6ffce51dc16285094be49244b26591956c2dd6 (patch) | |
tree | f83e9fb9cde96e2e5b5d2e89ea9ae0333d2f0b9b /activerecord/test/models/topic.rb | |
parent | b2192888ab28b4cc36a54b5c918c6773de95a030 (diff) | |
download | rails-fe6ffce51dc16285094be49244b26591956c2dd6.tar.gz rails-fe6ffce51dc16285094be49244b26591956c2dd6.tar.bz2 rails-fe6ffce51dc16285094be49244b26591956c2dd6.zip |
Make sure inner scope conditions get a preference over the outer ones
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r-- | activerecord/test/models/topic.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb index 39ca1bf42a..08bb24ed03 100644 --- a/activerecord/test/models/topic.rb +++ b/activerecord/test/models/topic.rb @@ -4,6 +4,8 @@ class Topic < ActiveRecord::Base { :conditions => ['written_on < ?', time] } } named_scope :approved, :conditions => {:approved => true} + named_scope :rejected, :conditions => {:approved => false} + named_scope :by_lifo, :conditions => {:author_name => 'lifo'} named_scope :approved_as_hash_condition, :conditions => {:topics => {:approved => true}} |