Created
January 28, 2011 15:19
-
-
Save ahoward/800374 to your computer and use it in GitHub Desktop.
This file contains 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
# instead of setting all paths individually, you set all of them relative to | |
# another root, say my_gem/lib/rails/engine this way | |
if defined?(Rails) | |
module MyGem | |
class Engine < Rails::Engine | |
paths.path = MyGem.engine_dir | |
p paths.app.to_a #=> MyGem.engine_dir + '/app' | |
p paths.app.controllers.to_a #=> MyGem.engine_dir + '/app/controllers' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment