0

i want to show all the posts users have upvoted on, how can I do this.

1 Answers1

0

Let's say you have such models

class Post < ApplicationRecord
  acts_as_votable
end
class User < ApplicationRecord
  acts_as_voter
end

To get all upvoted posts of some user (e.g. current_user)

current_user.get_up_voted(Post)

Please also look at the docs

mechnicov
  • 12,025
  • 4
  • 33
  • 56