Reputation: 11687
I create my own namespaced generator, and I would like to invoke some rails generators ie. model from it. How to accomplish it? I looking also for examples of such code.
Upvotes: 0
Views: 226
Reputation: 107728
In Spree's dummy generator we run the AppGenerator
from within Rails using this code. This generator is actually called from within a Rake task called common:test_app
which is called when we run bundle exec rake test_app
at the root of Spree or in the directory for any component of Spree.
I hope this provides you with a decent enough example to get started.
Upvotes: 1