]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Fix deprecation warnings
[rails.git] / app / controllers / application_controller.rb
index d571535d356ef4db7646df3b618c816b2b6f4574..b4c0fbc23feb7a5f1fb5c4f1482f740357fde78c 100644 (file)
@@ -208,7 +208,7 @@ class ApplicationController < ActionController::Base
     report_error e.message, :bad_request
   rescue ActiveRecord::RecordInvalid => e
     message = "#{e.record.class} #{e.record.id}: "
-    e.record.errors.each { |attr, msg| message << "#{attr}: #{msg} (#{e.record[attr].inspect})" }
+    e.record.errors.each { |error| message << "#{error.attribute}: #{error.message} (#{e.record[error.attribute].inspect})" }
     report_error message, :bad_request
   rescue OSM::APIError => e
     report_error e.message, e.status