After migration, how to see new columns?

Adding a column in a migration won't make rails add the necessary view code to show it. That's up to you.

Rein

are you absolutely sure that create and edit are both calling render :partial => 'form' to display the new/edit form?

And list should be a different view and usually doesn't render the form that create and edit use, since it'll be a list of your items. To include your new colum in the list view, just do something like

<%= @object.my_new_column %>

Adam

Are you absolutely sure you restarted your webserver process? Everything looks good to me. Keep in mind that Class.content_columns won't retrieve _every_ column in your database. For example, foreign key attributes will not be retrieved (are project and vendor actually project_id and vendor_id ?), and it seems that columns with the word 'count' in them won't be returned either. In any case, an easy way to solve this is to start replacing the scaffolding code with real code (scaffolding is really just meant as a starting point anyways).

So instead of using:

<table>   <tr>   <% for column in Item.content_columns %>     <th><%= column.human_name %></th>   <% end %>   </tr> .... </table>

you can do the following:

controller.rb: @items = Item.find(:all)

in your view.rhtml: <table> <thead>   <tr><th>Project</th><th>Vendor</th><th>SKU</th><th>Name</th>...</tr> </thead> <tbody>   <% for item in @items %>   <tr>     <td><%= item.project %></t </tr>   <% end %> </tbody> </table>

Hope this helps

Adam