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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Spree’s dummy generator we run the
AppGeneratorfrom within Rails using this code. This generator is actually called from within a Rake task calledcommon:test_appwhich is called when we runbundle exec rake test_appat 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.