Skip to content

Commit

Permalink
re-added multiparameter attributes and updated for Rails 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrocel committed Jun 11, 2013
1 parent f869763 commit fefb0b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/mongoid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
require "mongoid/sessions"
require "mongoid/document"
require "mongoid/unit_of_work"
require "mongoid/multi_parameter_attributes"

# If we are using Rails then we will include the Mongoid railtie. This has all
# the nifty initializers that Mongoid needs.
Expand Down
2 changes: 1 addition & 1 deletion lib/mongoid/multi_parameter_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def process_attributes(attrs = nil)
if attrs
errors = []
attributes = attrs.class.new
attributes.permitted = true if attrs.respond_to?(:permitted?) && attrs.permitted?
attributes.permit! if attrs.respond_to?(:permitted?) && attrs.permitted?
multi_parameter_attributes = {}

attrs.each_pair do |key, value|
Expand Down

0 comments on commit fefb0b1

Please sign in to comment.