Displaying 1 result from an estimated 1 matches for "flightmap".
2006 Aug 08
1
Best way to get data from n+1 models
...te])
r = Reservation.find(:all,:conditions=>["flight_id=? and
date=?",flight,date])
And get the full map with t.concat(r). That was an answer for my
previous question and I thank you dudes for that.
My doubt now is what''s the best place to put this stuff. Suppose I want
a FlightMap object, where I can send the flight id and date and get the
array with the info above. The best way is create a model (with no
table) to do this, with a method to return the data? Like
class FlightMap
def map(flight_id,date)
<code above inserted here>
end
end
FligthMap.map(fli...