Too many columns for list.rhtml to display

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

for example

def content_column    @content_columns ||= columns.reject { |c| c.name != 'some_column_name'} end

best, Bojan Mihelac

Jose Pepe wrote: