【发布时间】:2014-09-10 02:55:44
【问题描述】:
好的,
我正在使用haml创建一个模板,遇到了一个错误。
我通常在 haml 中使用“
即:
%p
%img{:src => "link to image"}<
Some text
但是当我使用
image_tag "image name", :alt => "some text"
Some text
如何将“
【问题讨论】:
好的,
我正在使用haml创建一个模板,遇到了一个错误。
我通常在 haml 中使用“
即:
%p
%img{:src => "link to image"}<
Some text
但是当我使用
image_tag "image name", :alt => "some text"
Some text
如何将“
【问题讨论】:
如果是我,我会考虑将image_tag 插入到末尾带有"Some text" 的字符串中:
= "#{image_tag('image_name', :alt => 'some text')} Some text"
【讨论】: