aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/railtie.rb
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-10-17 21:16:54 -0400
committerJon Moss <me@jonathanmoss.me>2016-10-17 21:16:54 -0400
commit4aae8bfe4dc6da1722e7f0f1722cf1f7ef472c19 (patch)
tree32d119bb4aa9228b4d0e37e0f7504f0592b95ec3 /actionview/lib/action_view/railtie.rb
parent8e76f6959efc44c8575b721fdf53d06ea9430fed (diff)
downloadrails-4aae8bfe4dc6da1722e7f0f1722cf1f7ef472c19.tar.gz
rails-4aae8bfe4dc6da1722e7f0f1722cf1f7ef472c19.tar.bz2
rails-4aae8bfe4dc6da1722e7f0f1722cf1f7ef472c19.zip
Convert ActionController::Parameters to a hash in button_to
Before, an error would be raised saying that the method `to_param` was undefined on the instance of `ActionController::Parameters`. Now, we are checking to see if the `params` object being passed to `button_to` responds to the `permitted?` method, and if so, we will call `to_h` on it. If it does not respond to `permitted?`, then the `params` will remain unchanged. [Jon Moss, Rafael Mendonça França]
Diffstat (limited to 'actionview/lib/action_view/railtie.rb')
0 files changed, 0 insertions, 0 deletions