projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5e10a7d
)
Arrays have a length method, not a count method.
author
Tom Hughes
<tom@compton.nu>
Tue, 21 Apr 2009 11:36:41 +0000
(11:36 +0000)
committer
Tom Hughes
<tom@compton.nu>
Tue, 21 Apr 2009 11:36:41 +0000
(11:36 +0000)
app/models/way.rb
patch
|
blob
|
history
diff --git
a/app/models/way.rb
b/app/models/way.rb
index e134d697d63a2b14a5cd61a3c29624c8b00b7714..eb4bf48f428d84c981945447700ab38be15a6529 100644
(file)
--- 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']
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])
end
self.nds.each do |n|
node = Node.find(:first, :conditions => ["id = ?", n])