X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/93da9596997444baa576e296e371065a3cb99eb3..8c326a6c1fcea02c2937579524c30b5c77c4d8eb:/app/controllers/application_controller.rb?ds=sidebyside 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