Put range in f.submit

It may be simpe, but it does not seem to work. I have the following submit button

<%= f.submit 'Send Message', class: 'btn submit', id: 'validForm' %>

and I want to put the icomoon image in the button

<span class="icon-envelope"></span>

But how do I get the span class inside a button ??

thank

+4
source share
1 answer

Use button_tag and place the opening inside the button this way

<%= button_tag(type: 'submit', class: "btn submit", id: 'validForm') do %>
 <span class="icon-envelope"></span> Send Message
<% end %>
+7
source

Source: https://habr.com/ru/post/1529904/


All Articles