Created
June 20, 2012 19:51
-
-
Save jrochkind/2961820 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
# This file provided in engine | |
module MyEngine | |
module MainAppControllerMethods | |
def do_it | |
return params[:do_it] | |
end | |
end | |
end | |
# Local 'main app' should be instructed to simply add this manually to their | |
# own ApplicationController | |
require 'my_engine/main_app_controller_methods' | |
class ApplicationController < ActionController::Base | |
#.... | |
include MyEngine::MainAppControllerMethods | |
# .... | |
end | |
# Now every controller in the host app has access to a #do_it method. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment