From 48ae3bcefd37d618eb32189b9a3b374d1c3bb301 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Thu, 27 Mar 2014 15:29:16 -0700 Subject: [PATCH] fixes #2116 --- app/models/favorite.rb | 2 +- app/models/post.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/favorite.rb b/app/models/favorite.rb index 9fc50c878..f913f6669 100644 --- a/app/models/favorite.rb +++ b/app/models/favorite.rb @@ -19,7 +19,7 @@ class Favorite < ActiveRecord::Base post.append_user_to_fav_string(user.id) User.update_all("favorite_count = favorite_count + 1", {:id => user.id}) 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? end diff --git a/app/models/post.rb b/app/models/post.rb index aae373a67..84eb83f58 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -607,7 +607,7 @@ class Post < ActiveRecord::Base module FavoriteMethods def clean_fav_string? - rand(100) < 50 + true end def clean_fav_string!