diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-11-20 19:01:03 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-11-20 19:01:03 -0200 |
commit | 6db9915ea8180ca7a7386a0361cc1305f1f4870b (patch) | |
tree | 890ffd92d4c7b1d164950e22cb9469097ccaffbd /actionview/lib/action_view | |
parent | b0f44c9ff0be84ebc42760029adeeb9dd954655f (diff) | |
parent | b0cc858dd71576011c6f2a3995457c070d8b55d5 (diff) | |
download | rails-6db9915ea8180ca7a7386a0361cc1305f1f4870b.tar.gz rails-6db9915ea8180ca7a7386a0361cc1305f1f4870b.tar.bz2 rails-6db9915ea8180ca7a7386a0361cc1305f1f4870b.zip |
Merge pull request #17690 from claudiob/add-enforce-utf8-to-form-for
Add `:enforce_utf8` option to form_for
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/helpers/form_helper.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 03f80ff360..2119ea938f 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -164,6 +164,8 @@ module ActionView # * <tt>:namespace</tt> - A namespace for your form to ensure uniqueness of # id attributes on form elements. The namespace attribute will be prefixed # with underscore on the generated HTML id. + # * <tt>:enforce_utf8</tt> - If set to false, a hidden input with name + # utf8 is not output. # * <tt>:html</tt> - Optional HTML attributes for the form tag. # # Also note that +form_for+ doesn't create an exclusive scope. It's still @@ -420,6 +422,7 @@ module ActionView html_options[:data] = options.delete(:data) if options.has_key?(:data) html_options[:remote] = options.delete(:remote) if options.has_key?(:remote) html_options[:method] = options.delete(:method) if options.has_key?(:method) + html_options[:enforce_utf8] = options.delete(:enforce_utf8) if options.has_key?(:enforce_utf8) html_options[:authenticity_token] = options.delete(:authenticity_token) builder = instantiate_builder(object_name, object, options) |