开发者

haml display address

开发者 https://www.devze.com 2023-03-18 22:48 出处:网络
album/show.html.haml #comment_list= render :partial => \'shared/comments\', :locals => { :commentable => @album }
album/show.html.haml

    #comment_list= render :partial => 'shared/comments', :locals => { :commentable => @album }

shared/_comments.html.haml

    #comments
      = commentable.comments.each do |comment|
        = comment.content

display
开发者_JAVA技巧
    Hello #<Comment:0x7f668f037710>

why is address displaying? How to remove it?


What happens if you remove the = before commentable? I think the parser understand that you are mixIng erb and haml. Try removing = and inserting - instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消