fesplugas/typus — pull request #421 by marktran (2013-07-23 22:15:26+00:00)
Title: fix for model detection failing if concerns exist

The generator was failing on my Rails 4 project because I have a concern defined in app/models/concerns:

/Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:463:in `load_missing_constant': Unable to autoload constant Concerns::TracksTimeCreated, expected /Users/m/src/redacted/project/app/models/concerns/tracks_time_created.rb to define it (LoadError)
from /Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:183:in `const_missing'
from /Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/typus-394e4969983d/lib/typus.rb:171:in `const_get'
from /Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/typus-394e4969983d/lib/typus.rb:171:in `block (2 levels) in application_models'
from /Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/typus-394e4969983d/lib/typus.rb:171:in `each'
from /Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/typus-394e4969983d/lib/typus.rb:171:in `inject'
from /Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/typus-394e4969983d/lib/typus.rb:171:in `block in application_models'
from /Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/typus-394e4969983d/lib/typus.rb:169:in `map'
from /Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/typus-394e4969983d/lib/typus.rb:169:in `application_models'
from /Users/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/typus-394e4969983d/lib/generators/typus/typus_generator.rb:31:in `generate_controllers'