Je peux comprendre pourquoi ce code simple ne compilerait pas. Peut être les yeux frais verront ce que je manque.Quel est le problème avec mon div_for?
<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>
Je reçois l'erreur
compile error
/Users/leonid/Documents/rails_apps/appdepot/app/views/projects/_show_participants.html.erb:9: erreur de syntaxe, unexpected «) ' ... ((div_for (participation) do) .to_s); @ output_buffer.concat ... ^ /Users/leonid/Documents/rails_apps/appdepot/app/views/projects/_show_participants.html.erb:14: erreur de syntaxe, kEND inattendu, attendu ')' ; fin ; @ output_buffer.concat "\ n \ n" ^ /Users/leonid/Documents/rails_apps/appdepot/app/views/projects/_show_participants.html.erb:31: erreur de syntaxe, kENSURE inattendue, attendue ')' /utilisateurs/leonid/Documents/rails_apps/AppDepot/app/views/projets/_show_participants.html.erb: 33: erreur de syntaxe, kend inattendue, expecting ')'
Est-ce que 'participation 'a objet ActiveRecord valide? – zetetic