Skip to content

Commit c9cdf74

Browse files
committed
Remove unnecessary dup from FormTagHelper#field_id
This was needed when `sanitized_method_name` was a memoised method, but since 59ca21c it's a local variable.
1 parent f6f250e commit c9cdf74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actionview/lib/action_view/helpers/form_tag_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def field_id(object_name, method_name, *suffixes, index: nil)
104104

105105
# a little duplication to construct fewer strings
106106
if sanitized_object_name.empty?
107-
sanitized_method_name.dup
107+
sanitized_method_name
108108
elsif suffixes.any?
109109
[sanitized_object_name, index, sanitized_method_name, *suffixes].compact.join("_")
110110
elsif index

0 commit comments

Comments
 (0)