开发者

DataMapper model in a rails mountable engine?

开发者 https://www.devze.com 2023-04-06 13:11 出处:网络
I\'m building a mountable engine. From a basic install, I\'开发者_如何学运维ve moved my existing application into the engine namespace.

I'm building a mountable engine.

From a basic install, I'开发者_如何学运维ve moved my existing application into the engine namespace.

The engine starts, but I've getting error messages because there are no tables in a db for the controller to reference.

  • How do I get my models in a database from the engine?
  • How can I test this with the provided dummy app?

I looked into dm-migrations, but I've yet to use that with DataMapper, so I'm sort of in clueless, uncharted waters. Giant question marks and all that. I'll poke around, but there is nothing through a search that is useful, right now.

Here is the application I'm playing with: http://github.com/blueblank/Ticket-Engine


The simple and straight forward answer is to create a generator that copies the models to the main app. That is it and simple, though looking at it in the long run, having the dm models in the engines app/models folder as the only prerequisite for installing models to an application from an engine (or mountable engine) would be fantastic.

0

精彩评论

暂无评论...
验证码 换一张
取 消