I want to add a ruby ββbadge on the rails. I have currently tried the following:
<%= button_to raw("<i class=\"icon-arrow-up\"></i>"), {:controller => 'events', :action => "upvoteEvent", :method => "put", :id => @event.id, :uid => current_user.id}, {:class => "btn btn-success"}%>
which creates the following html:
<form action="/events/upvoteEvent?id=17&method=put&uid=7" class="button_to" method="post"><div><input class="btn btn-success" type="submit" value="<i class="icon-arrow-up"></i>" /><input name="authenticity_token" type="hidden" value="FsVUPiYl0cK666pn8hqo6AU9/HK0CweZ/nsXqwOWZzU=" /></div></form>
I have implemented the solution posted here: https://stackoverflow.com/a/167438/2/3 , but this will not work for me. I also tested that Bootstrap CSS works by simply inserting an icon in a different place on the site.
Thanks for any help!
Bjorn source share