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 %>

<% for person in @people %>
  <% for column in Person.content_columns %>
    <td><%=h person.send( %></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| != 'some_column_name'}

Bojan Mihelac

Jose Pepe wrote: