Rails button_to - applying css class to button

后端 未结 2 843
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-17 08:02

This is silly, but I just can\'t figure out how to style the input element created by Rails button_to -- and yes, I\'ve read the docs over and over again and tr

2条回答
  •  庸人自扰
    2020-12-17 09:01

    <%= button_to "Claim", {action: "claim", idea_id: idea.id, remote: true}, {form_class: 'form', class: 'btn btn-small'} %>

    form_class: class for the form

    class : class for button in the form

提交回复
热议问题