diff options
author | Leonardo Capillera <leonardo@wyeworks.com> | 2010-11-18 16:31:27 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-11-18 16:46:55 -0200 |
commit | be797750e6ce866ea08307f63bf35304a965c8d4 (patch) | |
tree | 1f5427f7ce13ab209c874598a1bf15bcd0fe78a2 /actionpack/lib/action_view/helpers | |
parent | c52e2cf4b3ef22fea6989df906a53188e632b9a4 (diff) | |
download | rails-be797750e6ce866ea08307f63bf35304a965c8d4.tar.gz rails-be797750e6ce866ea08307f63bf35304a965c8d4.tar.bz2 rails-be797750e6ce866ea08307f63bf35304a965c8d4.zip |
Remove deprecated form_for with strings or symbols
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 12 |
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) |