diff options
author | Rizwan Reza <rizwanreza@gmail.com> | 2010-06-05 04:04:49 +0430 |
---|---|---|
committer | Rizwan Reza <rizwanreza@gmail.com> | 2010-06-05 04:04:49 +0430 |
commit | e6f2102178b19ac8d49363b5fa145f22483c30ee (patch) | |
tree | b5dff24210eb3f521087fe66a9b734165ad22967 /activerecord/lib/active_record/associations | |
parent | 1535b02a9f8e0eaa3cd3182a45d2bd7855c3809c (diff) | |
parent | 8e8cb1769f3a78c53e5b79d0ce6a08589045cfca (diff) | |
download | rails-e6f2102178b19ac8d49363b5fa145f22483c30ee.tar.gz rails-e6f2102178b19ac8d49363b5fa145f22483c30ee.tar.bz2 rails-e6f2102178b19ac8d49363b5fa145f22483c30ee.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 0dfd966466..d9903243ce 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -411,7 +411,8 @@ module ActiveRecord end elsif @reflection.klass.scopes[method] @_named_scopes_cache ||= {} - @_named_scopes_cache[method] ||= with_scope(construct_scope) { @reflection.klass.send(method, *args) } + @_named_scopes_cache[method] ||= {} + @_named_scopes_cache[method][args] ||= with_scope(construct_scope) { @reflection.klass.send(method, *args) } else with_scope(construct_scope) do if block_given? |