favoriting upvotes only if you are gold
This commit is contained in:
@@ -840,7 +840,7 @@ class Post < ActiveRecord::Base
|
|||||||
|
|
||||||
def add_favorite!(user)
|
def add_favorite!(user)
|
||||||
Favorite.add(self, user)
|
Favorite.add(self, user)
|
||||||
vote!("up")
|
vote!("up") if CurrentUser.is_gold?
|
||||||
rescue PostVote::Error
|
rescue PostVote::Error
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -850,7 +850,7 @@ class Post < ActiveRecord::Base
|
|||||||
|
|
||||||
def remove_favorite!(user)
|
def remove_favorite!(user)
|
||||||
Favorite.remove(self, user)
|
Favorite.remove(self, user)
|
||||||
unvote!
|
unvote! if CurrentUser.is_gold?
|
||||||
rescue PostVote::Error
|
rescue PostVote::Error
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user