aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-03-21 16:52:47 -0400
committerGitHub <noreply@github.com>2017-03-21 16:52:47 -0400
commit88b16843f67bcd96395444ba8f139895351da0bc (patch)
tree23c04e185936996f1e3d10cf5d71cb4f1022ecfe /actionpack/lib
parentb7bd4e2848145fe6b342d510b9e250ab7799563c (diff)
parentea5aa2525b4fbc7d8323a7e4c3ee98db2ee5acb4 (diff)
downloadrails-88b16843f67bcd96395444ba8f139895351da0bc.tar.gz
rails-88b16843f67bcd96395444ba8f139895351da0bc.tar.bz2
rails-88b16843f67bcd96395444ba8f139895351da0bc.zip
Merge pull request #28056 from sngeth/wrap_store_accessors_in_params
Wrap stored accessors in parameters
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/params_wrapper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb
index 3cca5e8906..a89fc1678b 100644
--- a/actionpack/lib/action_controller/metal/params_wrapper.rb
+++ b/actionpack/lib/action_controller/metal/params_wrapper.rb
@@ -105,7 +105,11 @@ module ActionController
unless super || exclude
if m.respond_to?(:attribute_names) && m.attribute_names.any?
- self.include = m.attribute_names
+ if m.respond_to?(:stored_attributes) && !m.stored_attributes.empty?
+ self.include = m.attribute_names + m.stored_attributes.values.flatten.map(&:to_s)
+ else
+ self.include = m.attribute_names
+ end
end
end
end