aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/metal/params_wrapper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb
index f4f2381286..9f79d796cc 100644
--- a/actionpack/lib/action_controller/metal/params_wrapper.rb
+++ b/actionpack/lib/action_controller/metal/params_wrapper.rb
@@ -113,6 +113,13 @@ module ActionController
self.include = m.attribute_names
end
end
+ if m.respond_to?(:nested_attributes_options) && m.nested_attributes_options.any?
+ nested_attributes_names = self.nested_attributes_options.keys.map do |key|
+ key.to_s.concat('_attributes').to_sym
+ end
+ self.include += nested_attributes_names
+ end
+
end
end
end