Displaying 1 result from an estimated 1 matches for "joining_stop".
Did you mean:
joining_stops
2006 Mar 29
1
Query a timetable (cute solution?)
...e = "'' +
params[:search][:start_station] + ''"'', :include => :stops)
@end_station = Station.find(:first, :conditions => ''name = "'' +
params[:search][:end_station] + ''"'')
@start_station.stops.each do |stop|
@joining_stops = stop.run.stops
@joining_stops.each do |stop|
if stop.station.id = @end_station.id
@matches.push(stop.run)
break
end
end
end
Can anyone suggest a better(simpler) way of approching this problem?
--
Posted via http://www.ruby-forum.com/.