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
Post a Comment