diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-07-21 10:37:09 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-21 11:29:58 +0200 |
commit | 6807b080996ee4bd6b80abb4f5e9964632c421c8 (patch) | |
tree | 9ab10340178251987b5379b74948ba1ac6389a1b /actionpack/lib/action_view | |
parent | fa8b290496789eb037d4fad89acea1cb0a534f35 (diff) | |
download | rails-6807b080996ee4bd6b80abb4f5e9964632c421c8.tar.gz rails-6807b080996ee4bd6b80abb4f5e9964632c421c8.tar.bz2 rails-6807b080996ee4bd6b80abb4f5e9964632c421c8.zip |
Moved a few methods from RecordIdentifier to ActiveModel::Naming
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 711c455ded..524913ae29 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -302,12 +302,12 @@ module ActionView object_name = record_or_name_or_array when Array object = record_or_name_or_array.last - object_name = options[:as] || ActionController::RecordIdentifier.singular_class_name(object) + object_name = options[:as] || ActiveModel::Naming.singular(object) apply_form_for_options!(record_or_name_or_array, options) args.unshift object else object = record_or_name_or_array - object_name = options[:as] || ActionController::RecordIdentifier.singular_class_name(object) + object_name = options[:as] || ActiveModel::Naming.singular(object) apply_form_for_options!([object], options) args.unshift object end @@ -533,7 +533,7 @@ module ActionView object = args.first else object = record_or_name_or_array - object_name = ActionController::RecordIdentifier.singular_class_name(object) + object_name = ActiveModel::Naming.singular(object) end builder = options[:builder] || ActionView::Base.default_form_builder @@ -1156,11 +1156,11 @@ module ActionView end when Array object = record_or_name_or_array.last - name = "#{object_name}#{index}[#{ActionController::RecordIdentifier.singular_class_name(object)}]" + name = "#{object_name}#{index}[#{ActiveModel::Naming.singular(object)}]" args.unshift(object) else object = record_or_name_or_array - name = "#{object_name}#{index}[#{ActionController::RecordIdentifier.singular_class_name(object)}]" + name = "#{object_name}#{index}[#{ActiveModel::Naming.singular(object)}]" args.unshift(object) end |