Created
November 9, 2012 21:33
-
-
Save nicholasjhenry/4048396 to your computer and use it in GitHub Desktop.
Rails Engine Tips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Refinery | |
| module CustomFeature | |
| class Engine < Rails::Engine | |
| initializer "core.load_app_instance_data" do |app| | |
| app.class.configure do | |
| # Add migrations to the host application's path | |
| config.paths['db/migrate'] += Refinery::Templates::Engine.paths['db/migrate'].existent | |
| end | |
| end | |
| config.to_prepare do | |
| # Add a custom helper | |
| Refinery::Admin::PagesController.helper(Refinery::Admin::CustomHelper) | |
| end | |
| end | |
| end | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For more information see: https://gist.github.com/e139fa787aa882c0aa9c