diff options
author | John Mileham <jmileham@gmail.com> | 2011-05-26 11:40:57 -0400 |
---|---|---|
committer | John Mileham <jmileham@gmail.com> | 2011-05-26 11:40:57 -0400 |
commit | 043b6243901aea2e7f604e1d4ce655cfe595ceb7 (patch) | |
tree | e4e8bdf3c9eb58c779599ac2084de15cb8af0e14 /activerecord | |
parent | 294e2a8c2e3223caa9ccbde070509a9c0471fdaa (diff) | |
download | rails-043b6243901aea2e7f604e1d4ce655cfe595ceb7.tar.gz rails-043b6243901aea2e7f604e1d4ce655cfe595ceb7.tar.bz2 rails-043b6243901aea2e7f604e1d4ce655cfe595ceb7.zip |
Don't merge base opts into includes when serializing ARs
Conflicts:
activerecord/lib/active_record/serialization.rb
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/serialization.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/serialization.rb b/activerecord/lib/active_record/serialization.rb index be4354ce6a..e3185a9c5a 100644 --- a/activerecord/lib/active_record/serialization.rb +++ b/activerecord/lib/active_record/serialization.rb @@ -31,9 +31,6 @@ module ActiveRecord #:nodoc: def serializable_add_includes(options = {}) return unless include_associations = options.delete(:include) - base_only_or_except = { :except => options[:except], - :only => options[:only] } - include_has_options = include_associations.is_a?(Hash) associations = include_has_options ? include_associations.keys : Array.wrap(include_associations) @@ -46,9 +43,8 @@ module ActiveRecord #:nodoc: end if records - association_options = include_has_options ? include_associations[association] : base_only_or_except - opts = options.merge(association_options) - yield(association, records, opts) + association_options = include_has_options ? include_associations[association] : {} + yield(association, records, association_options) end end |