If I try to use bootstrap’s icon class, it doesn’t show correctly.
Anyone knows how to display it?
<%= f.submit nil, :class => 'btn btn-primary', :value => sanitize('<i class="icon-plus icon-white"></i> ') + 'Create!' if @community.new_record? %>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
glyphicon-halflings-white.png(for white icons) must be in the Rails app’sapp/assets/imagesdirectory. Then add<i class="icon-plus icon-white"></i>to your desired view.To use the icon as a form submit button, pass a block to
button_tag:Sources: