Skip to content

Instantly share code, notes, and snippets.

@jacoyutorius
Created August 18, 2014 12:34
Show Gist options
  • Select an option

  • Save jacoyutorius/04182e00c61ac5356336 to your computer and use it in GitHub Desktop.

Select an option

Save jacoyutorius/04182e00c61ac5356336 to your computer and use it in GitHub Desktop.
Rails4でSubmitボタンにFontAwesomeのアイコンを埋め込む ref: http://qiita.com/jacoyutorius/items/c73327f049ee5270d505
<%= button_tag :type => "submit", :class =>"btn btn-default btn-s-md" do %>
<i class="fa fa-search"></i>検索
<% end %>
<%= button_tag sanitize('<i class="fa fa-search"></i>検索'), :type => "submit",
:class =>"btn btn-default btn-s-md" %>
<%= button_tag '<i class="fa fa-search"></i>検索'.html_safe, :type => "submit",
:class =>"btn btn-default btn-s-md" %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment