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