Today I Learned

hashrocket A Hashrocket project

Rails Ignore Pending Migrations

Ruby on Rails gives us a nice warning in development when we haven't run a pending database migration. But what if we're iterating on a migration, and the results can best be viewed in the browser? We might want to temporarily disable this warning.

Here's how to do it:

# config/environments/development.rb
config.active_record.migration_error = false

Don't forget to turn it back on when you're finished.

See More #rails TILs
Looking for help? Hashrocket has been an industry leader in Ruby on Rails since 2008. Rails is a core skill for each developer at Hashrocket, and we'd love to take a look at your project. Contact us and find out how we can help you.