I thought I\'d come up with a slick way to extend ApplicationController in a Rails 3.x gem.
In my gem\'s lib/my_namespace/my_controller.rb, I had:
lib/my_namespace/my_controller.rb
Truth is much much simpler and flexible.
Add to lib/engine.rb this: class Engine < Rails::Engine; end
lib/engine.rb
class Engine < Rails::Engine; end
And then simply use:
ActionController::Base.class_eval do include SomethingFromMineGemModule # or: def hello_from_gem 'Hey people!' end end