]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
More improvements to locale selection for the data browser
[rails.git] / app / controllers / application_controller.rb
index bee5e8169a4709d05f5d36ead2c6924a03f2db6a..045e93eb7a1f4f073c280e79738f007a546910d8 100644 (file)
@@ -10,7 +10,9 @@ class ApplicationController < ActionController::Base
   around_action :better_errors_allow_inline, :if => proc { Rails.env.development? }
 
   attr_accessor :current_user
+
   helper_method :current_user
+  helper_method :preferred_langauges
 
   private
 
@@ -185,6 +187,8 @@ class ApplicationController < ActionController::Base
 
   def api_call_handle_error
     yield
+  rescue ActionController::UnknownFormat
+    head :not_acceptable
   rescue ActiveRecord::RecordNotFound => e
     head :not_found
   rescue LibXML::XML::Error, ArgumentError => e