X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/009a4dbb673507ce06d8933cd836a1284e360330..32c3000af7c2c4016b75abf5a396262e28aabd72:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f419460ee..a2211ea69 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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 @@ -233,7 +235,7 @@ class ApplicationController < ActionController::Base e = e.cause if e.is_a?(Timeout::Error) || - (e.is_a?(ActiveRecord::StatementInvalid) && e.message =~ /execution expired/) + (e.is_a?(ActiveRecord::StatementInvalid) && e.message.include?("execution expired")) render :action => "timeout" else raise