pascalh1011/migrant — pull request #24 by matt-riemer (2013-09-19 21:07:31+00:00)
Title: Use safe_constantize when scanning models

In my Rails3 applications, I have a /app/models/concerns/ directory that contains numerous files which extend ActiveSupport::Concern.

When running the 'rails generate migration' or 'rake db:upgrade' commands, migrant throws an exception when scanning these files. This occurs because they're Modules not classes.

Using safe_constantize fixes this and allows migrant to generate migrations normally.