aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/topic.rb
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2011-12-17 14:41:17 +0300
committerSergey Nartimov <just.lest@gmail.com>2011-12-17 14:41:17 +0300
commit04cea56d89e71dbb25dc888d8f855ba18025ccca (patch)
treef52d503896b7c14b0cd92a2566ef1aea6c94e20c /activerecord/test/models/topic.rb
parent1bfed9efb39f4a8eff2867bb1d8b9e19ecc8ca02 (diff)
downloadrails-04cea56d89e71dbb25dc888d8f855ba18025ccca.tar.gz
rails-04cea56d89e71dbb25dc888d8f855ba18025ccca.tar.bz2
rails-04cea56d89e71dbb25dc888d8f855ba18025ccca.zip
call scope within unscoped to prevent duplication of where values
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r--activerecord/test/models/topic.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index fe424e61b2..ede662450e 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -8,6 +8,8 @@ class Topic < ActiveRecord::Base
scope :approved, :conditions => {:approved => true}
scope :rejected, :conditions => {:approved => false}
+ scope :scope_with_lambda, lambda { scoped }
+
scope :by_lifo, :conditions => {:author_name => 'lifo'}
scope :approved_as_hash_condition, :conditions => {:topics => {:approved => true}}