Rails 4.1 migration

please review and test