Commit 8dcceb6059ba4a6f4f66e16aeb6da2b958bef6d1

Authored by Hugo Melo
1 parent aecbf9e4

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 177 end
178 178  
179 179 def initialize(environment=nil)
180   - #return if environment.nil?
  180 + return if environment.nil?
181 181 @environment = environment
182   - @environment = Environment.default if environment.nil?
183 182  
184 183 AVAILABLE_RULES.each do |point_type, setting|
185 184 GamificationPlugin::PointsCategorization.by_type(point_type).includes(:profile).each do |categorization|
... ...