From 3d62563c4a08c2850bbc30ca556c73f8da8196a2 Mon Sep 17 00:00:00 2001 From: Hugo Melo Date: Sat, 26 Sep 2015 13:34:31 -0300 Subject: [PATCH] Fix dashboard with points change --- lib/gamification_plugin/dashboard_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gamification_plugin/dashboard_helper.rb b/lib/gamification_plugin/dashboard_helper.rb index 7d85fc3..7da1c27 100644 --- a/lib/gamification_plugin/dashboard_helper.rb +++ b/lib/gamification_plugin/dashboard_helper.rb @@ -12,7 +12,8 @@ module GamificationPlugin::DashboardHelper end def score_point_category(point) - HashWithIndifferentAccess.new(Merit::PointRules::AVAILABLE_RULES)[point.score.category][:description] + point = GamificationPlugin::PointsType.where(name: point.score.category).first + point.nil? ? '' : point.description end def ranking(target, from_date=nil, limit=10) -- libgit2 0.21.2