]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
pass common API error text through to Potlatch so it can be shown to the user
[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])