Make http_accept_language work with rails 3.1.0
authorTom Hughes <tom@compton.nu>
Sat, 24 Sep 2011 17:06:23 +0000 (18:06 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 14 Nov 2011 09:42:52 +0000 (09:42 +0000)
vendor/plugins/http_accept_language/init.rb

index 67e2687..050a7ca 100644 (file)
@@ -1,4 +1,6 @@
-if defined?(ActionController::Request)
+if defined?(ActionDispatch::Request)
+  ActionDispatch::Request.send :include, HttpAcceptLanguage
+elsif defined?(ActionController::Request)
   ActionController::Request.send :include, HttpAcceptLanguage
 elsif defined?(ActionController::AbstractRequest)
   ActionController::AbstractRequest.send :include, HttpAcceptLanguage