So I'm working on a new project that seems like a great choice for using the new Engine functionality. It's as engines say, its own little app, w/ its own views and controllers and models. Here's where I'm coming up short.
I create my test application in which I will mount the new engine.
rails new engine_app && cd engine_app
I then create the new engine
rails plugin new my_engine --mountable
I then add the 'gem' to the engine_app's gemfile
gem 'my_engine', :path => './my_engine'
I then mount the engine in engine_app's routes as so
mount MyEngine::Engine, :at => '/my_engine'
I then cd into my_engine's dummy app and run
rails generate model MyModel title:string body:text
Here's where I run into my confusion. From what I understand this is supposed to generate a namespace table (I think it would be my_engine_my_model). The table in the migration file is just my_model.
Secondly how do I run this migration and is the migration file correct in only calling the table :my_model? I have tried running the following but nothing seems to happen, and I've checked the database and the table isn't there.
So to recap, I need to know how to create migrations in the engine, and be able to run them on the parent apps database correctly.
Thanks for any help and guidance.