]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Patching better 412 error messages from mis-commit on old api06 branch.
[rails.git] / app / models / way.rb
index cbbe6ada41f540eca762b22786e6e6aa45da362f..97f44c1171337375bb72166153f86be7f3837fff 100644 (file)
@@ -224,7 +224,7 @@ class Way < ActiveRecord::Base
   def preconditions_ok?
     return false if self.nds.empty?
     if self.nds.length > APP_CONFIG['max_number_of_way_nodes']
-      raise OSM::APITooManyWayNodesError.new(self.nds.count, APP_CONFIG['max_number_of_way_nodes'])
+      raise OSM::APITooManyWayNodesError.new(self.nds.length, APP_CONFIG['max_number_of_way_nodes'])
     end
     self.nds.each do |n|
       node = Node.find(:first, :conditions => ["id = ?", n])