Hi, I'm having trouble creating the right code to query the following:
- I have a table of "trails" and a table of "trailreports" - "trails" has a "hasmany" relationship with "trailreports" - "trailreports" has a field "trail_id", "report" and "created_at" field. I would like to query the list of "trails" that have the most resent "trailreports" based on the "created_at" field which is a timestamp. How do I got about this ? Thank You, Nick, --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---