From: Tom Hughes Date: Tue, 21 Apr 2009 11:36:41 +0000 (+0000) Subject: Arrays have a length method, not a count method. X-Git-Tag: live~8082 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ff9f596cea152b43bdd3d0daf124eb59b459dada Arrays have a length method, not a count method. --- 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])