From 04cea56d89e71dbb25dc888d8f855ba18025ccca Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Sat, 17 Dec 2011 14:41:17 +0300 Subject: call scope within unscoped to prevent duplication of where values --- activerecord/test/models/topic.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/models/topic.rb') 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}} -- cgit v1.2.3