From 0fc833ce88ba0ce5b5e33b1754c6c87561c7e791 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Wed, 28 Oct 2015 17:16:27 -0300 Subject: [PATCH] Fix plugin initialization --- lib/merit/point_rules.rb | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/merit/point_rules.rb b/lib/merit/point_rules.rb index 6f7253e..5156692 100644 --- a/lib/merit/point_rules.rb +++ b/lib/merit/point_rules.rb @@ -154,6 +154,8 @@ module Merit end def self.setup + return unless GamificationPlugin::PointsType.table_exists? && GamificationPlugin::PointsCategorization.table_exists? + AVAILABLE_RULES.map do |rule_name, rule| point_type = GamificationPlugin::PointsType.find_by_name rule_name point_type = GamificationPlugin::PointsType.create name: rule_name, description: rule['description'] if point_type.nil? -- libgit2 0.21.2