This commit is contained in:
r888888888
2014-03-27 15:29:16 -07:00
parent 72e15012eb
commit 48ae3bcefd
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ class Favorite < ActiveRecord::Base
post.append_user_to_fav_string(user.id) post.append_user_to_fav_string(user.id)
User.update_all("favorite_count = favorite_count + 1", {:id => user.id}) User.update_all("favorite_count = favorite_count + 1", {:id => user.id})
user.favorite_count += 1 user.favorite_count += 1
post.fav_count += 1 # post.fav_count += 1 # this is handled in Post#clean_fav_string!
post.score += 1 if user.is_gold? post.score += 1 if user.is_gold?
end end

View File

@@ -607,7 +607,7 @@ class Post < ActiveRecord::Base
module FavoriteMethods module FavoriteMethods
def clean_fav_string? def clean_fav_string?
rand(100) < 50 true
end end
def clean_fav_string! def clean_fav_string!