ruby on rails - How to query to get all users based on a nested resource? -


given:

  room (id, update_at) roommember (room_id, user_id) user (Id)   

How can I get all the users of the last updated all rooms in the last 24 hours in the train?

Thanks

  Selection ('Specific User. *') Joins (: rooms) .where ('rooms.updated_at & gt ;?', 1.day.ago)    

Comments

Popular posts from this blog

php - Creating canonical URLs with custom route-classes -

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -

Mysql Local server hardware -