Add a class to f.submit but keep default functionality?

前端 未结 1 1152
眼角桃花
眼角桃花 2021-02-05 15:14

Very simple question, I have:

<%= f.submit %>

I want to apply class=\'btn\' to it. I know that I can easily do this:

相关标签:
1条回答
  • 2021-02-05 16:11
    <%= f.submit nil, :class => 'btw' %>
    

    or even

    <%= f.submit :class => 'btw' %>
    
    0 讨论(0)
提交回复
热议问题