views:

66

answers:

0

I have a model user, a feed, and a comment. user has many feeds and comments, feeds belong to user and have many comments and finally comments belong to user and feed.

No when i show feeds for a certain user, it selects all the comments made till date for every feed. I want it to select only those comments that were made in the last 1 min, and if none were, i want to show the 2 most recent ones... how can i do that???