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

前端 未结 4 1084
独厮守ぢ
独厮守ぢ 2021-02-04 00:15

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:55

    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 %>    
    

提交回复
热议问题