If you look at the image of my app below, you'd see that first button has no glyph icon (the play icon) and second but does. Can someone please help me with putting a glyph icon in the first button just as in the button below?
This post Adding Bootstrap icon to button in Ruby on Rails and this Using link_to with embedded HTML didn't work for me. This is the code for the first and second buttons:
<div>
<blockquote class="pull-left">
<p id="joke_section">
<%= @l.content %>
</p>
<small><%= @l.author %> </small>
<%= button_to "Następny", random_joke_path, {remote: true, class: "btn btn-small"} %>
</blockquote>
</div>
</div>
</div>
<div><blockquote class="pull-left">
<p id="mycontainer"><%= @l.content %> </p>
<small><%= @l.author %> </small>
<button id="but" class="btn btn-small", "pull=right" type="button">
Następny <i class="icon-play"></i>
</button>
</blockquote></div>
this is what works with button_to
<%= button_to random_joke_path, {remote: true, class: "btn btn-small"} do %>
Następny <i class="icon-play"></i>
<% end %>