I have this form:
<%= form_tag(user_pages_path(current_user), :method => "get") do %>
<%= text_field_tag :update, 'yes', type: "hidden" %>
<%= submit_tag "Update list", :class => "btn btn-default" %>
<% end %>
and I would like to include an icon in the button. I'm using bootstrap, so i must include this code:
<i class=" icon-repeat"></i>
¿Any idea about how to include this code in the form button?
You can use button_tag
instead of submit_tag
:
<%= button_tag(type: "submit", class: "btn btn-default") do %>
Update list <i class="icon-repeat"></i>
<% end %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With