]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_preference_controller.rb
Add a redirect and error message if user ends up trying to report something without...
[rails.git] / app / controllers / user_preference_controller.rb
index 4b556aed011741dc0e4f952c7136ee29aaa973a1..16165513aefa217b11b1ac80520a89882de5d465 100644 (file)
@@ -45,7 +45,7 @@ class UserPreferenceController < ApplicationController
       if preference = old_preferences.delete(pt["k"])
         preference.v = pt["v"]
       elsif new_preferences.include?(pt["k"])
       if preference = old_preferences.delete(pt["k"])
         preference.v = pt["v"]
       elsif new_preferences.include?(pt["k"])
-        raise OSM::APIDuplicatePreferenceError.new(pt["k"])
+        raise OSM::APIDuplicatePreferenceError, pt["k"]
       else
         preference = current_user.preferences.build(:k => pt["k"], :v => pt["v"])
       end
       else
         preference = current_user.preferences.build(:k => pt["k"], :v => pt["v"])
       end