]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/changeset_controller.rb
Rename all ID columns that aren't unique
[rails.git] / app / controllers / changeset_controller.rb
index 51d0049a792961cecbfb9b28234940bb908fbc34..ca501fd43183cc3d45d09d53b01eb4434064fb70 100644 (file)
@@ -177,7 +177,7 @@ class ChangesetController < ApplicationController
           created << elt.to_xml_node
         else
           # get the previous version from the element history
-          prev_elt = elt.class.where(:id => elt.id, :version => elt.version).first
+          prev_elt = elt.class.find([elt.id, elt.version])
           unless elt.visible
             # if the element isn't visible then it must have been deleted, so
             # output the *previous* XML