Skip to content

Instantly share code, notes, and snippets.

@rafael
Created November 5, 2013 18:30
Show Gist options
  • Select an option

  • Save rafael/7323718 to your computer and use it in GitHub Desktop.

Select an option

Save rafael/7323718 to your computer and use it in GitHub Desktop.
Include a module into action controller when loading a gem.
class Engine < Rails::Engine
initializer 'imprenta.controller_methods' do |app|
ActionController::Base.send :include, Imprenta::CachePage
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment