mardi 5 mai 2015

Displaying upvotes on different models together

I have upvotes working on posts and comments using the acts_as_votable gem. I display the posts and comments a user has upvoted like this:

@upvoted_posts = @user.get_voted Post
@upvoted_comments = @user.get_voted Comment

Is there a way that I can show the upvoted posts and comments together in one feed?

Aucun commentaire:

Enregistrer un commentaire