HTML code inside buttons with simple_form

前端 未结 5 1297
情深已故
情深已故 2020-12-09 14:54

I\'m new to rails, and just found the simple_form gem. I installed it with bootstrap suport, but now I can\'t get this code to work the way I want it

<%=          


        
5条回答
  •  失恋的感觉
    2020-12-09 15:33

    In simple_form 3.0rc use :button button type (it passes your block to original ActiveView button helper):

    <%= f.button :button do %>
      
      Commit
    <% end %>
    

    Or write additional button wrapper.

    For additional info look into simple_form/form_builder.rb FormBuilder#button method.

提交回复
热议问题