aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 8c300ec745..dec1ae6e4f 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -303,15 +303,9 @@ module ActionView
options[:html] ||= {}
- case record
- when String, Symbol
- object_name = record
- object = nil
- else
- object = record.is_a?(Array) ? record.last : record
- object_name = options[:as] || ActiveModel::Naming.param_key(object)
- apply_form_for_options!(record, options)
- end
+ object = record.is_a?(Array) ? record.last : record
+ object_name = options[:as] || ActiveModel::Naming.param_key(object)
+ apply_form_for_options!(record, options)
options[:html][:remote] = options.delete(:remote)
builder = options[:parent_builder] = instantiate_builder(object_name, object, options, &proc)