So, I'm working on a new project that seems like a great choice to use the new Engine functionality. This, as the engines say, is its own application, with its own representations and controllers and models. Here, where I am a little behind.
I create my test application in which I can install a new engine.
rails new engine_app && cd engine_app
Then create a new engine
rails plugin new my_engine --mountable
Then I add "gem" to the gemfile engine_app
gem 'my_engine', :path => './my_engine'
Then I mount the engine in the engine_app routes so
mount MyEngine::Engine, :at => '/my_engine'
Then I write cd to my_engine dummy app and run
rails generate model MyModel title:string body:text
Here, where I run into confusion. From what I understand, this should create a namespace table (I think it will be my_engine_my_model). The table in the migration file is just my_model.
Secondly, how do I perform this migration and is the migration file valid only for calling the table: my_model? I tried to run the following, but nothing happens, and I checked the database and the table is not there.
So, to understand, I need to know how to create migrations in the engine, and be able to correctly run them in the database of the parent applications.
Thanks for any help and recommendations.