Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit 6762ff9

Browse files
committed
fix nested attributes
1 parent 06324e6 commit 6762ff9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/mass_assignment_security/nested_attributes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def assign_nested_attributes_for_collection_association(association_name, attrib
7979
class_name = attributes_collection.class.name
8080

8181
if class_name == 'ActionController::Parameters'
82-
attributes_collection = attributes_collection.to_h
82+
attributes_collection = attributes_collection.to_unsafe_h
8383
elsif !['Hash','Array'].include?(class_name)
8484
raise ArgumentError, "ActionController::Parameters or Hash or Array expected, got #{attributes_collection.class.name} (#{attributes_collection.inspect})"
8585
end

0 commit comments

Comments
 (0)