0
我与HAML不注入在正确的地方内容挣扎我想要的结果(初级),这里是HAML的一部分:红宝石HAML没有得到
%div.form-group{:id => 'container'}
- if [email protected]?
%p= t('users.data_name')
= link_to t('users.delete'), 'javascript:void(0)', :class => 'delete', :data => {:id => @data.id}
%div.holder.thick
= image_tag @data.path
- else
= link_to t('users.upload'), 'javascript:void(0)', :class => 'btn btn-large'
%div.holder
= image_tag '/assets/missing_image.png'
的问题是, holder
或holder thick
不在我的容器内,但在外面。为什么是这样?我没有正确调整什么?
缩进休息http://html2haml.heroku.com/ – apneadiving
代替'%div.holder',使用'.holder',并用#container替换'%div.form-group {:id =>'container'}'。 form-group','%div.holder.thick'应该是'.holder.thick' – apneadiving
http://haml2erb.herokuapp.com/ – apneadiving