From 61555a0df11f535d46a0a631fbb0d0773613d08e Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 27 Apr 2012 11:52:34 +0100 Subject: allow AssociationProxy#scoped to take options so that API is the same as Base#scoped --- activerecord/test/cases/associations_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb index 4d3751bba5..6412ec0599 100644 --- a/activerecord/test/cases/associations_test.rb +++ b/activerecord/test/cases/associations_test.rb @@ -214,6 +214,10 @@ class AssociationProxyTest < ActiveRecord::TestCase david = developers(:david) assert_equal david.association(:projects), david.projects.proxy_association end + + def test_scoped_allows_conditions + assert developers(:david).projects.scoped(where: 'foo').where_values.include?('foo') + end end class OverridingAssociationsTest < ActiveRecord::TestCase -- cgit v1.2.3