]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/traces_controller.rb
Localisation updates from https://translatewiki.net.
[rails.git] / app / controllers / api / traces_controller.rb
index 629617f0b127c01685ed460f7a7ed0d688da89e6..b66aead38e1506e3afe3390da38c28853ace81e6 100644 (file)
@@ -115,7 +115,7 @@ module Api
       trace.save!
 
       # Finally save the user's preferred privacy level
-      if pref = current_user.preferences.where(:k => "gps.trace.visibility").first
+      if pref = current_user.preferences.find_by(:k => "gps.trace.visibility")
         pref.v = visibility
         pref.save
       else