posts.rb: vote on behalf of correct user when moving favorites.
Bug: when an approver moves the favorites of a post, each favorite is removed from the child post and added to the parent post. For gold+ users, this triggers an upvote, but these upvotes were performed by the approver rather than the favoriter.
This commit is contained in:
@@ -35,7 +35,7 @@ class PostVote < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def initialize_user
|
||||
self.user_id = CurrentUser.user.id
|
||||
self.user_id ||= CurrentUser.user.id
|
||||
end
|
||||
|
||||
def update_post_on_destroy
|
||||
|
||||
Reference in New Issue
Block a user