Reputation: 322
I have this piece of code (ruby haml)
= button_to tr('single_sign_on') , '/something/something0', method: :post, class: "btn-SSO"
Now I need to insert 2 icons to the button text.
Any idea how to do that. I have zero experience with this tech & codebase.
This doesn't have to use the button_to
helper function.
Can be just plain haml (i'm assuming I would have to wrap this in a form then).
Upvotes: 0
Views: 144
Reputation: 739
This helper takes a block as a parameter where you can add icons https://apidock.com/rails/v5.2.3/ActionView/Helpers/UrlHelper/button_to
= button_to '/something/something0', method: :post, class: "btn-SSO" do
= tr('single_sign_on')
i.fa.fa-save # example
Upvotes: 1