开发者

What is wrong with my div_for?

I can figure out why this simple code would not compile. May be fresh eyes will see what I am missing.

<table>
<tr>
    <th></th>
    <th><%=h "Name <Email>" %></th>
    <th>Role</th>
</tr>
<% project.participations.each do |participation| %>
    <tr>
        <%= div_for(participation) do %>
        <td>some stuff</td>
        <td>more stuff</td>
        <% end %>
    </tr>
<% end %>
</table>

I am getting the error

compile error

/Users/leonid/Documents/rails_apps/appdepot/app/views/projects/_show_participants.html.erb:9: syntax error, unexpected ')' ...(( div_for(participation)开发者_运维技巧 do ).to_s); @output_buffer.concat ... ^ /Users/leonid/Documents/rails_apps/appdepot/app/views/projects/_show_participants.html.erb:14: syntax error, unexpected kEND, expecting ')' ; end ; @output_buffer.concat "\n\n" ^ /Users/leonid/Documents/rails_apps/appdepot/app/views/projects/_show_participants.html.erb:31: syntax error, unexpected kENSURE, expecting ')' /Users/leonid/Documents/rails_apps/appdepot/app/views/projects/_show_participants.html.erb:33: syntax error, unexpected kEND, expecting ')'


<%= div_for(participation) do %>

should be

<% div_for(participation) do %>

without the equals sign in front

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜