From 17a1f4dfc983b29c29bfdad20ff31298987f8d40 Mon Sep 17 00:00:00 2001 From: Hugo Melo Date: Mon, 26 Oct 2015 18:46:28 -0200 Subject: [PATCH] Avoid recursive loop saving profile --- lib/merit/rank_observer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/merit/rank_observer.rb b/lib/merit/rank_observer.rb index cd2ca39..9d40dc2 100644 --- a/lib/merit/rank_observer.rb +++ b/lib/merit/rank_observer.rb @@ -5,7 +5,7 @@ module Merit merit = changed_data[:merit_object] if merit.kind_of?(Merit::Score::Point) profile = merit.score.sash.profile - profile.update_attribute(:level, profile.gamification_plugin_calculate_level) if profile.present? + profile.update_column(:level, profile.gamification_plugin_calculate_level) if profile.present? end end end -- libgit2 0.21.2