Skip to content

Commit

Permalink
Merge pull request mongodb#3442 from aj0strow/hashie-support
Browse files Browse the repository at this point in the history
call to_hash before sanitizing to allow Hashie::Mash support
  • Loading branch information
arthurnn committed Dec 14, 2013
2 parents af0233d + f214e10 commit e3a55c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid/attributes/processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module Processing
def process_attributes(attrs = nil)
attrs ||= {}
if !attrs.empty?
attrs = sanitize_for_mass_assignment(attrs)
attrs = sanitize_for_mass_assignment(attrs.to_hash)
attrs.each_pair do |key, value|
next if pending_attribute?(key, value)
process_attribute(key, value)
Expand Down

0 comments on commit e3a55c2

Please sign in to comment.