mirror of
https://github.com/zhigang1992/tsemple.git
synced 2026-04-30 21:52:18 +08:00
Update psot vote status in js
This commit is contained in:
@@ -1,2 +1,7 @@
|
||||
module PostsHelper
|
||||
def post_votes(posts, user)
|
||||
user.post_votes.where(post_id: posts.pluck(:id)).map { |post_vote|
|
||||
{ post_id: post_vote.post_id, value: post_vote.value }
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user