Hi colin - yes, sorry that was badly worded.  Rob's solution is fine but 
for the record i meant 'datetime' and i should have said

"I want to find the most recent record from the states table before a 
given datetime, and if that doesn't exist, the first one *after* (or at) 
that datetime?"

cheers, max
-- 
Posted via http://www.ruby-forum.com/.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to