<%= with a block in rails 4

前端 未结 1 827
忘掉有多难
忘掉有多难 2021-01-23 23:16

I\'m trying to use a block in a helper,

but that\'s giving me this error:

SyntaxError - syntax error, unexpected \')\'
...rbout.concat(( green_title do ).t         


        
1条回答
  •  抹茶落季
    2021-01-23 23:57

    Your block is being associated with concat instead of content_tag

    Try using parentheses to identify what belongs where.

    concat(content_tag(:h3) do
      yield
    end)
    

    0 讨论(0)
提交回复
热议问题