Emm*_*uel 1 ruby-on-rails twitter-bootstrap glyphicons
如果你看下面我的应用程序的图像,你会看到第一个按钮没有字形图标(播放图标),第二个按钮没有.有人可以帮我在第一个按钮中放置一个字形图标,就像下面的按钮一样吗?
这篇文章将Bootstrap图标添加到Ruby on Rails中的按钮,这个使用带有嵌入式HTML的link_to对我来说不起作用.这是第一个和第二个按钮的代码:
<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>
Run Code Online (Sandbox Code Playgroud)
这是有用的 button_to
<%= button_to random_joke_path, {remote: true, class: "btn btn-small"} do %>
Nast?pny <i class="icon-play"></i>
<% end %>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4747 次 |
最近记录: |