X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9a9b045372a6f48420a9a6dacfde52c34ab7abce..c5ef6404f5782c8305f9d1d25d2c99a545cdd9a1:/app/controllers/user_preference_controller.rb diff --git a/app/controllers/user_preference_controller.rb b/app/controllers/user_preference_controller.rb index 2b6df65e6..bf9bab213 100644 --- a/app/controllers/user_preference_controller.rb +++ b/app/controllers/user_preference_controller.rb @@ -39,13 +39,13 @@ class UserPreferenceController < ApplicationController new_preferences = {} - doc = XML::Parser.string(request.raw_post).parse + doc = XML::Parser.string(request.raw_post, :options => XML::Parser::Options::NOERROR).parse doc.find("//preferences/preference").each do |pt| if preference = old_preferences.delete(pt["k"]) preference.v = pt["v"] elsif new_preferences.include?(pt["k"]) - fail OSM::APIDuplicatePreferenceError.new(pt["k"]) + raise OSM::APIDuplicatePreferenceError.new(pt["k"]) else preference = @user.preferences.build(:k => pt["k"], :v => pt["v"]) end