diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-11 12:42:21 +0200 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-09-11 23:26:07 +1000 |
commit | b3f6c41e16b46273ede8ae26b5bf8d931057720a (patch) | |
tree | f877ab6d22722478217b367a697dd652917fa517 | |
parent | 8b66c91c51bfc163fa8c2af019a1a6f64c3e6a53 (diff) | |
download | rails-b3f6c41e16b46273ede8ae26b5bf8d931057720a.tar.gz rails-b3f6c41e16b46273ede8ae26b5bf8d931057720a.tar.bz2 rails-b3f6c41e16b46273ede8ae26b5bf8d931057720a.zip |
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>
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 6d70c63de9..79a9d997dd 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -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 |