]> git.openstreetmap.org Git - rails.git/commitdiff
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 67e2687e3f2e438ae6aefc065b619439b0a30d33..050a7ca5640995ed026063a0028b10356b4dc497 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