Where are my engines?
Right now, I am working on an engine for the Gogobot application.
As part of my work on the engine, I am working with the Mongoid gem and the Fabrication gem, both great gems b.t.w.
The problem with Fabrication is that it wasn’t really adapted to working with Engines and it was relying a lot on Rails.root for where to locate the fabricator files.
Since in an engine, the application is located in spec/dummy I needed a better way locate the fabricators.
ok… so far the story of how I got to even writing this post.
To solve my problem I needed to grab all of the engines that are included inside the Rails application.
Turns out, there’s a real easy way to do it.
You can look at my solution including this line in the pull request I have open for Fabrication here: https://github.com/paulelliott/fabrication/pull/114Submit to Hacker News
[NOTE] This post has been imported to Hugo from a Wordpress blog. It may be broken, missing images, code snippets or other information.
[NOTE] updated July 5, 2012. It's 2322 days old . This article may have outdated content.