Displaying 1 result from an estimated 1 matches for "flight_map".
2006 Aug 08
1
Best way to get data from n+1 models
...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(flight_id,date)
Is that correct? The file flight_map.rb will be on the models directory,
creating the FlightMap model, used just to join information of the other
tables? There is no FligthMap table to join this kind of information, is
a dynamic operation based on a specific date, retrieving the data from
the other tables.
I think it works but ne...