Arrays have a length method, not a count method.
This commit is contained in:
parent
5e10a7d48b
commit
ff9f596cea
1 changed files with 1 additions and 1 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue