]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/changeset_controller.rb
Rework expansion of HTTP status code to work with rails 3
[rails.git] / app / controllers / changeset_controller.rb
index 8789476dbf4a4def010df3b46cc793ccf9f2a540..b580ea7866ec5bbd5810c60c9cf46b8d21e5f161 100644 (file)
@@ -177,9 +177,7 @@ class ChangesetController < ApplicationController
           created << elt.to_xml_node
         else
           # get the previous version from the element history
-          prev_elt = elt.class.find(:first, :conditions => 
-                                    ['id = ? and version = ?',
-                                     elt.id, elt.version])
+          prev_elt = elt.class.where(:id => elt.id, :version => elt.version).first
           unless elt.visible
             # if the element isn't visible then it must have been deleted, so
             # output the *previous* XML