Very simple question, I have:
<%= f.submit %>
I want to apply class='btn'
to it. I know that I can easily do this:
<%= f.submit 'Button Name', :class => 'btw' %>
But...how do I achieve the same thing, i.e. apply a class without specifying a static name for the button?
In other words, given that I am doing this in my form partial, I want the name of the button to change according to the action being called (i.e. new, create, update, etc.). So how do I get the best of both worlds?
<%= f.submit nil, :class => 'btw' %>
or even
<%= f.submit :class => 'btw' %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With