Skip to content

Commit 734b7f4

Browse files
authored
Merge pull request rails#52810 from chaadow/fix_action_view_code_gen
Use only one batch to generate form selectors
2 parents 88dc93e + abdcbae commit 734b7f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

actionview/lib/action_view/helpers/form_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,8 +2020,8 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
20202020
#
20212021
# Please refer to the documentation of the base helper for details.
20222022

2023-
(field_helpers - [:label, :checkbox, :radio_button, :fields_for, :fields, :hidden_field, :file_field]).each do |selector|
2024-
ActiveSupport::CodeGenerator.batch(self, __FILE__, __LINE__) do |code_generator|
2023+
ActiveSupport::CodeGenerator.batch(self, __FILE__, __LINE__) do |code_generator|
2024+
(field_helpers - [:label, :checkbox, :radio_button, :fields_for, :fields, :hidden_field, :file_field]).each do |selector|
20252025
code_generator.class_eval do |batch|
20262026
batch <<
20272027
"def #{selector}(method, options = {})" <<

0 commit comments

Comments
 (0)