aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib')
-rw-r--r--actionview/lib/action_view/helpers/form_helper.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb
index f470375988..7d574f0a14 100644
--- a/actionview/lib/action_view/helpers/form_helper.rb
+++ b/actionview/lib/action_view/helpers/form_helper.rb
@@ -468,9 +468,9 @@ module ActionView
options[:url] ||= if options.key?(:format)
polymorphic_path(record, format: options.delete(:format))
- else
- polymorphic_path(record, {})
- end
+ else
+ polymorphic_path(record, {})
+ end
end
private :apply_form_for_options!
@@ -1574,12 +1574,12 @@ module ActionView
record_name = if index
"#{object_name}[#{index}][#{record_name}]"
- elsif record_name.to_s.end_with?("[]")
- record_name = record_name.to_s.sub(/(.*)\[\]$/, "[\\1][#{record_object.id}]")
- "#{object_name}#{record_name}"
- else
- "#{object_name}[#{record_name}]"
- end
+ elsif record_name.to_s.end_with?("[]")
+ record_name = record_name.to_s.sub(/(.*)\[\]$/, "[\\1][#{record_object.id}]")
+ "#{object_name}#{record_name}"
+ else
+ "#{object_name}[#{record_name}]"
+ end
fields_options[:child_index] = index
@template.fields_for(record_name, record_object, fields_options, &block)