Don't ask the backend directly for the available locales - just ask
authorTom Hughes <tom@compton.nu>
Fri, 22 May 2009 23:42:17 +0000 (23:42 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 22 May 2009 23:42:17 +0000 (23:42 +0000)
the I18n module and let it worry about where to find them.

app/controllers/application.rb

index d902eac75528cff48a6edf870e45d6ac3bffb7a2..97332ba01eeabd25b58398450b3cd9097e3a0c64 100644 (file)
@@ -102,7 +102,7 @@ class ApplicationController < ActionController::Base
   end
   
   def set_locale
-    request.compatible_language_from(I18n.backend.available_locales)
+    request.compatible_language_from(I18n.available_locales)
   end
 
   def api_call_handle_error