【发布时间】:2014-02-28 09:15:05
【问题描述】:
对于 Rails 环境还是很陌生,我正在尝试将链接渲染到另一个链接 我想重现 list-group-custom-content 组件
这是渲染得很好的haml内容
%div{:class => ["list-group"]}
- @tickets.each do |ticket|
= link_to "#", :class => "list-group-item" do
%div.row
%div{:class => "col-sm-8"}
%h4{:class => "list-group-item-heading"}
Blabla
%p{:class => "list-group-item-text"}
blabla bla blabla
%div{:class => "col-sm-4"}
other content
The corresponding rendered html
这里是要失败的haml内容
%div{:class => ["list-group"]}
- @tickets.each do |ticket|
= link_to "#", :class => "list-group-item" do
%div.row
%div{:class => "col-sm-8"}
%h4{:class => "list-group-item-heading"}
= link_to ticket.subject, "#" -# <- Here is the problem
%p{:class => "list-group-item-text"}
blabla bla blabla
%div{:class => "col-sm-4"}
other content
The corresponding rendered html
你能帮帮我吗?
【问题讨论】:
-
您能否在实际问题中包含您获得的 HTML 以及您期望获得的内容?如果人们不必从其他网站下载文件,您将获得更好的响应。
标签: twitter-bootstrap ruby-on-rails-4 haml link-to