Update for schema changes in the rails 3 code