Permalink
Browse files

Merge pull request #17 from DouweM/railtie-include-hook

Include EasyAccess in ActionController only after it has been loaded.
  • Loading branch information...
2 parents 1900d4e + ebf652f commit 3333337d37840c40ab2c20b813881e0025adbec6 @iain committed Jul 26, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/http_accept_language/railtie.rb
@@ -3,7 +3,10 @@ class Railtie < ::Rails::Railtie
initializer "http_accept_language.add_middleware" do |app|
app.middleware.use Middleware
- ApplicationController.send :include, EasyAccess
+
+ ActiveSupport.on_load :action_controller do
+ include EasyAccess
+ end
end
end

0 comments on commit 3333337

Please sign in to comment.