Dav*_*vid 6 ruby-on-rails simple-form twitter-bootstrap
我正在使用simple_form,nested_form和Twitter Bootstrap,并尝试将nested_form中的"Remove Link"放在与对象相同的行上.
现在它看起来像这样:
我希望它看起来像这样:
这是我的代码的样子:
<%= cform.simple_fields_for :licensings do |lf| %>
<%= lf.input :state, :collection => us_states, :wrapper => false %>
<%= lf.link_to_remove "Remove this Licensing", :class => 'btn btn-mini btn-danger' %>
<% end %>
Run Code Online (Sandbox Code Playgroud)
我已经尝试将第二个link_to_remove放在第一个lf.input的块中,但是实际的下拉列表没有出现.我查看了simple_form的代码,但是我无法找到是否有办法实现这一目标.
Dav*_*vid 12
谢谢你的答案,但我无法工作.我在Google网上论坛邮件列表中找到了答案:
https://groups.google.com/forum/?fromgroups#!topic/plataformatec-simpleform/hL9ek5svyAU
<%= cform.simple_fields_for :licensings do |lf| %>
<%= lf.input :state do %>
<%= lf.input_field :state, :collection => us_states %>
<%= lf.link_to_remove "Remove this Licensing", :class => 'btn btn-mini btn-danger' %>
<% end %>
<% end %>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4365 次 |
| 最近记录: |