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:
parent
8b66c91c51
commit
b3f6c41e16
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue