projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efc4c6f
)
Handle segments which do not exist correctly and indicate that the
author
Tom Hughes
<tom@compton.nu>
Fri, 27 Jul 2007 08:16:12 +0000
(08:16 +0000)
committer
Tom Hughes
<tom@compton.nu>
Fri, 27 Jul 2007 08:16:12 +0000
(08:16 +0000)
preconditions for the way are not met.
app/models/way.rb
patch
|
blob
|
history
diff --git
a/app/models/way.rb
b/app/models/way.rb
index 9d2239d5ca642f616a65b93a6042ec38555f57fa..09d1dafa0adca5b320aaad2003b63c36b9d85e43 100644
(file)
--- a/
app/models/way.rb
+++ b/
app/models/way.rb
@@
-189,7
+189,7
@@
class Way < ActiveRecord::Base
def preconditions_ok?
return false if self.segs.empty?
self.segs.each do |n|
- segment = Segment.find(
n
)
+ segment = Segment.find(
:first, :conditions => ["id = ?", n]
)
unless segment and segment.visible and segment.preconditions_ok?
return false
end