新手问题 haml 中 helper_method 的参数问题

hlcfan · 2012年08月29日 · 最后由 Rei 回复于 2012年08月29日 · 2218 次阅读
- @notifies.each do |n|
    %tr
        %td
            = getcomment n[1]       

n 是 Array 方法 getcomment 接到的参数并不是n[1]的值,而是'n[1]' 怎让让它接到正确的值?

这不正常,n[1] 应该就是值。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号