X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/30bbca0f3b05834dc9fd899e75e01b1994c0333b..e1005ce62f7b7cad67e0492581e480250192db70:/app/models/relation.rb diff --git a/app/models/relation.rb b/app/models/relation.rb index b66d957b9..7be027559 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -298,7 +298,7 @@ class Relation < ActiveRecord::Base # use reflection to look up the appropriate class model = Kernel.const_get(m[0].capitalize) # get the element with that ID - element = model.find(m[1]) + element = model.find(:first, :conditions =>["id = ?", m[1]]) # and check that it is OK to use. unless element and element.visible? and element.preconditions_ok?