How to set html on data-disable-with to rails submit_tag

前端 未结 4 945
感情败类
感情败类 2021-02-04 00:20

I have a RoR app using bootstrap. I\'m trying to apply the fontawesome html icon tag to a submit_tag helper, but it does not seem to be supported. When I click submit, the disa

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-04 00:56

    You should try to change submit_tag to button_tag, something like this:

    <%= button_tag "Go!", class: "btn btn-transparent", 'data-disable-with' => " Searching...".html_safe %>    
    

提交回复
热议问题