1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Change singular to param_key in form_helper, param_key is now used for generating field names

Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com>
This commit is contained in:
Piotr Sarnacki 2010-09-11 12:42:21 +02:00 committed by Mikel Lindsaar
parent 8b66c91c51
commit b3f6c41e16

View file

@ -306,11 +306,11 @@ module ActionView
object = record_object
when Array
object = record.last
object_name = options[:as] || ActiveModel::Naming.singular(object)
object_name = options[:as] || ActiveModel::Naming.param_key(object)
apply_form_for_options!(record, options)
else
object = record
object_name = options[:as] || ActiveModel::Naming.singular(object)
object_name = options[:as] || ActiveModel::Naming.param_key(object)
apply_form_for_options!([object], options)
end