diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-19 20:19:53 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-19 20:19:53 -0800 |
commit | bd2f5c062da011e092c1f122567f24bd5fc6d9b5 (patch) | |
tree | 968c8e162f67157b4cad826ce1680310e70dd7c1 /activerecord/lib/active_record/relation | |
parent | 4cdd44e3e0e22742a6e0ddc67c388cee0c8c13db (diff) | |
download | rails-bd2f5c062da011e092c1f122567f24bd5fc6d9b5.tar.gz rails-bd2f5c062da011e092c1f122567f24bd5fc6d9b5.tar.bz2 rails-bd2f5c062da011e092c1f122567f24bd5fc6d9b5.zip |
pushing caching and visitors down to the connection
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index af167dc59b..a789f48725 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -23,7 +23,7 @@ module ActiveRecord attribute.in(value.arel.ast) when Array, ActiveRecord::Associations::CollectionProxy values = value.to_a.map {|x| x.is_a?(ActiveRecord::Base) ? x.id : x} - ranges, values = values.partition {|value| value.is_a?(Range) || value.is_a?(Arel::Relation)} + ranges, values = values.partition {|v| v.is_a?(Range) || v.is_a?(Arel::Relation)} array_predicates = ranges.map {|range| attribute.in(range)} |