diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-06-28 01:57:32 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-06-28 01:57:32 +0100 |
commit | 9a25315076bf90c39ab5471fa8d81736a3b2478e (patch) | |
tree | 5dd3e063849064e806f74db60bfce1eb4f6d6406 /activerecord/test/models | |
parent | cd994eff9a343df376bfaec59de5b24a2ab51256 (diff) | |
download | rails-9a25315076bf90c39ab5471fa8d81736a3b2478e.tar.gz rails-9a25315076bf90c39ab5471fa8d81736a3b2478e.tar.bz2 rails-9a25315076bf90c39ab5471fa8d81736a3b2478e.zip |
Add extra hash conditions tests for named_scope
Diffstat (limited to 'activerecord/test/models')
-rwxr-xr-x | activerecord/test/models/topic.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb index 423b6fe52b..47b2eec938 100755 --- a/activerecord/test/models/topic.rb +++ b/activerecord/test/models/topic.rb @@ -4,6 +4,7 @@ class Topic < ActiveRecord::Base { :conditions => ['written_on < ?', time] } } named_scope :approved, :conditions => {:approved => true} + named_scope :approved_as_hash_condition, :conditions => {:topics => {:approved => true}} named_scope 'approved_as_string', :conditions => {:approved => true} named_scope :replied, :conditions => ['replies_count > 0'] named_scope :anonymous_extension do |