I have a submit button in my form:
= semantic_form_for record do |form|
= form.actions do
= form.submit 'Save'
I want to add an icon from FontAwesome, link_toI can use the block:
= link_to record do
= fa_icon 'save'
Save
But this does not work with Formtastic form.submit.
I also tried:
= form.submit fa_icon('save')
= form.submit fa_icon('save').html_safe
But both renderings avoid HTML.
How to add a font-awesome badge to a tag <button>?
source
share