From ff9f596cea152b43bdd3d0daf124eb59b459dada Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 21 Apr 2009 11:36:41 +0000 Subject: [PATCH] Arrays have a length method, not a count method. --- app/models/way.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/way.rb b/app/models/way.rb index e134d697d..eb4bf48f4 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -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]) -- 2.39.5