Skip to content
Browse files

Include EasyAccess in ActionController only after it has been loaded.

  • Loading branch information...
1 parent 1900d4e commit ebf652f1377084ac3f40d296aa7b06a40b5637bd @DouweM DouweM committed Jul 26, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/http_accept_language/railtie.rb
View
5 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 ebf652f

Please sign in to comment.
Something went wrong with that request. Please try again.