Commit a93710b3a73017f17f163e35469b99eed54e789c
1 parent
b8cb82b6
Exists in
master
and in
1 other branch
Don't initialize point_rules if there's no environment
Showing
1 changed file
with
1 additions
and
2 deletions
Show diff stats
lib/merit/point_rules.rb
@@ -177,9 +177,8 @@ module Merit | @@ -177,9 +177,8 @@ module Merit | ||
177 | end | 177 | end |
178 | 178 | ||
179 | def initialize(environment=nil) | 179 | def initialize(environment=nil) |
180 | - #return if environment.nil? | 180 | + return if environment.nil? |
181 | @environment = environment | 181 | @environment = environment |
182 | - @environment = Environment.default if environment.nil? | ||
183 | 182 | ||
184 | AVAILABLE_RULES.each do |point_type, setting| | 183 | AVAILABLE_RULES.each do |point_type, setting| |
185 | GamificationPlugin::PointsCategorization.by_type(point_type).includes(:profile).each do |categorization| | 184 | GamificationPlugin::PointsCategorization.by_type(point_type).includes(:profile).each do |categorization| |