From d4a4a6f11814649bf3c628492ff7ac45a6d2b610 Mon Sep 17 00:00:00 2001 From: Yurii Cherniavskyi Date: Fri, 20 Jul 2018 23:21:02 +0300 Subject: Fix leaking special form_with attributes into html attributes Special form_with attributes `skip_default_ids` and `allow_method_names_outside_object` attributes are leaking into html attributes of option select tag helpers. --- actionview/lib/action_view/helpers/form_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionview/lib/action_view/helpers/form_helper.rb') diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 2d5c5684c1..07f3d98322 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -1658,6 +1658,7 @@ module ActionView @nested_child_index = {} @object_name, @object, @template, @options = object_name, object, template, options @default_options = @options ? @options.slice(:index, :namespace, :skip_default_ids, :allow_method_names_outside_object) : {} + @default_html_options = @default_options.except(:skip_default_ids, :allow_method_names_outside_object) convert_to_legacy_options(@options) -- cgit v1.2.3