如何将嵌套链接添加到 Haml 模型

How to add nested links to Haml mockup

尝试在 Rails 上的 Ruby 上构建应用程序 - 遇到了 haml。 无法理解如何构建嵌套的每个循环 - 总是捕获不同的错误。 这里的代码示例:

%table
  %tr
    %th Title
    %th Text
  - @articles.each do |article|
    %tr
      %td article.title
      %td article.text
      %td
        - article.tags.each do |tag|
        = link_to(tag.tag_name)

错误:

syntax error, unexpected keyword_ensure, expecting keyword_end 

之后

end-of-input, expecting keyword_end

如果我删除 haml 标签,一切正常。无法理解我做错了什么..

%table
  %tr
    %th Title
    %th Text
  - @articles.each do |article|
    %tr
      %td= article.title
      %td= article.text
      %td
        - article.tags.each do |tag|
          = link_to(tag.tag_name)