diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-04-17 18:55:21 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-04-18 18:57:13 -0400 |
commit | 93034ad7fea7e00562103a7cd0acfab19bbfadf9 (patch) | |
tree | 9cba660f6dd0e0c26cf9de8ecf0a818c5a87970f /actionview/lib/action_view | |
parent | 70c6fb1a06d76d0d6cddb6fb50137aa1341745a0 (diff) | |
download | rails-93034ad7fea7e00562103a7cd0acfab19bbfadf9.tar.gz rails-93034ad7fea7e00562103a7cd0acfab19bbfadf9.tar.bz2 rails-93034ad7fea7e00562103a7cd0acfab19bbfadf9.zip |
Reuse the Parameters#to_h check in the routing helpers
Since this protection is now in Parameters we can use it instead of
reimplementing again.
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/helpers/url_helper.rb | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index 304db38060..70fc57c35f 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -621,11 +621,6 @@ module ActionView # # => [{name: 'country[name]', value: 'Denmark'}] def to_form_params(attribute, namespace = nil) attribute = if attribute.respond_to?(:permitted?) - unless attribute.permitted? - raise ArgumentError, "Attempting to generate a button from non-sanitized request parameters!" \ - " Whitelist and sanitize passed parameters to be secure." - end - attribute.to_h else attribute |