How to include a font awesome icon code within my button?
<%=f.submit "Post",class: "btn btn-primary btn-large" %>
<%=f.submit '<i class="icon-ok icon-white"></i>Post'.html_safe,class: "btn btn-primary btn-large"%>
If you're using Rails 4, you can pass a block to the submit method and include your HTML in there.
Try this:
<%= f.submit class: 'btn btn-primary btn-large' do %>
<i class="icon-ok icon-white"></i> Post ...
<% end %>
See this GitHub issue for more details: https://github.com/plataformatec/simple_form/issues/745