Skip to content

Instantly share code, notes, and snippets.

@ishouvik
Created August 22, 2015 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ishouvik/e0c5f06e64db948085cc to your computer and use it in GitHub Desktop.
Save ishouvik/e0c5f06e64db948085cc to your computer and use it in GitHub Desktop.
Share MainApp appplication helpers with Rails engines. This is more of a hack. Change your engine classname
# config/initializers/shared_helpers.rb
# Share main_app helpers with engine helpers
MyEngine::Engine.class_eval do
paths["app/helpers"] << File.join(File.dirname(__FILE__), '../..', 'app/helpers')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment