preconditions for the way are not met.
def preconditions_ok?
return false if self.segs.empty?
self.segs.each do |n|
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
unless segment and segment.visible and segment.preconditions_ok?
return false
end