X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/037585db3933a2954b43bd4b30ea5e30ade00be2..72855280e75474735d0c2b65aae55a68eda71462:/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