diff options
author | Vasiliy Ermolovich <younash@gmail.com> | 2011-12-04 22:12:24 +0300 |
---|---|---|
committer | Vasiliy Ermolovich <younash@gmail.com> | 2011-12-04 22:12:24 +0300 |
commit | e29773f885fd500189ffd964550ae20061d745ba (patch) | |
tree | f2e0fe6f86ed4c833e5396611553b8a879243326 /actionpack/lib | |
parent | e9b6659c4ccd4272a363835274ec2e36e778dcd8 (diff) | |
download | rails-e29773f885fd500189ffd964550ae20061d745ba.tar.gz rails-e29773f885fd500189ffd964550ae20061d745ba.tar.bz2 rails-e29773f885fd500189ffd964550ae20061d745ba.zip |
form_for with +:as+ option uses "action_as" as css class and id
Diffstat (limited to 'actionpack/lib')
-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 e674e12509..1a64b12aa6 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -387,8 +387,8 @@ module ActionView as = options[:as] action, method = object.respond_to?(:persisted?) && object.persisted? ? [:edit, :put] : [:new, :post] options[:html].reverse_merge!( - :class => as ? "#{as}_#{action}" : dom_class(object, action), - :id => as ? "#{as}_#{action}" : [options[:namespace], dom_id(object, action)].compact.join("_").presence, + :class => as ? "#{action}_#{as}" : dom_class(object, action), + :id => as ? "#{action}_#{as}" : [options[:namespace], dom_id(object, action)].compact.join("_").presence, :method => method ) |