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

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

c# - Confused over DLL entry points (entry point not found exception) -