where are all my fields?

I am confused as to why I am not able to view all the fields of a model I created when I try to create a new object. I checked my DB and they are all there, how ever when I click the "new" link to create a new object, some of the fields are missing. I edited the _form by hand to add the missing fields, but "show" and "list" doesn't list the items that were originally missing from create. I am new to rails and still trying to understand what is going on. Any help/insight would be greatly appreciated. Thanks -J

I'm guessing you used scaffolding, and then edited the migration (if not, then just ignore my post). Something like:

ruby script/generate scaffold product name:string price:decimal [a bunch of static files are generated, among others db/migrate/001_create_products.rb]

if, before you run the migration, you edit db/migrate/001_create_products.rb and add, let's say, a description column, and then rake db:migrate, your table will include this new column, but your views are still in the same state they were in when you did the scaffolding, only showing the name and price fields you told the scaffold about.

The default scaffolding is a one time operation to get you started on a resource. Once the files are there, you have to edit them yourself. (Or run the scaffold again, or use one of the plugins for dynamic scaffolding etc.)

- Martin

I think I have discovered what might be the problem. It appears that "content_columns" Returns an array of column objects where the primary id, all columns ending in "_id" or "_count", and columns used for single table inheritance have been removed. It turns out that my missing fields refer to columns ending in "id" and "count". There is a similar "columns" method that should show me what I need. thanks -Juan