Jose Pepe wrote:
Hi all
in the list.rhtml generated by the scaffoldhow can I select the columns I want to display. the code by default shows everything
% for column in Person.content_columns %> <th><%= column.human_name %></th> <% end %> </tr>
<% for person in @people %> <tr> <% for column in Person.content_columns %> <td><%=h person.send(column.name) %></td> <% end %>
Jose, you can overide content_columns method in Person model.
best regards, Bojan Mihelac