aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-04-27 14:04:16 -0700
committerKasper Timm Hansen <kaspth@gmail.com>2017-06-07 21:15:43 +0200
commite732f29d33f1e856c4a10af694863420c9b79e67 (patch)
tree05dbc6d96efa4c6652d62588f86c8a56e0ee540c
parent2b96d5822bfe407be7589e293f3265c0c7a6726c (diff)
downloadrails-e732f29d33f1e856c4a10af694863420c9b79e67.tar.gz
rails-e732f29d33f1e856c4a10af694863420c9b79e67.tar.bz2
rails-e732f29d33f1e856c4a10af694863420c9b79e67.zip
Move slicing to initializer.
Forgot all about https://github.com/rails/rails/pull/28844/files#r113780934 cc @rafaelfranca
-rw-r--r--actionview/lib/action_view/helpers/tags/base.rb2
-rw-r--r--actionview/lib/action_view/helpers/tags/select.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/tags/base.rb b/actionview/lib/action_view/helpers/tags/base.rb
index aa420c4b66..0895533a60 100644
--- a/actionview/lib/action_view/helpers/tags/base.rb
+++ b/actionview/lib/action_view/helpers/tags/base.rb
@@ -149,7 +149,7 @@ module ActionView
end
value = options.fetch(:selected) { value(object) }
- select = content_tag("select", add_options(option_tags, options, value), html_options.except!("skip_default_ids", "allow_method_names_outside_object"))
+ select = content_tag("select", add_options(option_tags, options, value), html_options)
if html_options["multiple"] && options.fetch(:include_hidden, true)
tag("input", disabled: html_options["disabled"], name: html_options["name"], type: "hidden", value: "") + select
diff --git a/actionview/lib/action_view/helpers/tags/select.rb b/actionview/lib/action_view/helpers/tags/select.rb
index 9ff7e54e4f..380f7a8c4e 100644
--- a/actionview/lib/action_view/helpers/tags/select.rb
+++ b/actionview/lib/action_view/helpers/tags/select.rb
@@ -6,7 +6,7 @@ module ActionView
@choices = block_given? ? template_object.capture { yield || "" } : choices
@choices = @choices.to_a if @choices.is_a?(Range)
- @html_options = html_options
+ @html_options = html_options.except(:skip_default_ids, :allow_method_names_outside_object)
super(object_name, method_name, template_object, options)
end