diff options
author | jvoorhis <jvoorhis@jeremy-voorhiss-macbook.local> | 2009-03-06 16:47:50 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-03-06 16:47:50 +0000 |
commit | 6a13376525f34a00e013fc3a6022838329dfe856 (patch) | |
tree | b34b909463c39f25de97cf8351ab8452ddfb9d84 /activerecord/test/models | |
parent | c67d25e3c4e636d7c94909a7398231a634accf46 (diff) | |
download | rails-6a13376525f34a00e013fc3a6022838329dfe856.tar.gz rails-6a13376525f34a00e013fc3a6022838329dfe856.tar.bz2 rails-6a13376525f34a00e013fc3a6022838329dfe856.zip |
Methods invoked within named scope Procs should respect the scope stack. [#1267 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/models')
-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 08bb24ed03..2fe846db48 100644 --- a/activerecord/test/models/topic.rb +++ b/activerecord/test/models/topic.rb @@ -33,6 +33,8 @@ class Topic < ActiveRecord::Base end named_scope :named_extension, :extend => NamedExtension named_scope :multiple_extensions, :extend => [MultipleExtensionTwo, MultipleExtensionOne] + + named_scope :by_rejected_ids, lambda {{ :conditions => { :id => all(:conditions => {:approved => false}).map(&:id) } }} has_many :replies, :dependent => :destroy, :foreign_key => "parent_id" serialize :content |