]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Arrays have a length method, not a count method.
[rails.git] / app / models / way.rb
index e134d697d63a2b14a5cd61a3c29624c8b00b7714..eb4bf48f428d84c981945447700ab38be15a6529 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])