lib/hackathon_manager.rb in hackathon_manager-0.13.12 vs lib/hackathon_manager.rb in hackathon_manager-0.14.0
- old
+ new
@@ -1,20 +1,8 @@
require "hackathon_manager/engine"
module HackathonManager
- def self.reload_config(app)
- hackathon = app.config_for(:hackathon)
-
- # Applications without a specified config.time_zone will parse
- # this as a string instead of a Time
- if hackathon['last_day_to_apply'].is_a?(String)
- hackathon['last_day_to_apply'] = Time.parse(hackathon['last_day_to_apply'])
- end
-
- app.config.hackathon = hackathon
- end
-
def self.field_enabled?(field)
- disabled_fields = Rails.configuration.hackathon['disabled_fields'] || []
+ disabled_fields = HackathonConfig.disabled_fields || ''
!disabled_fields.include?(field.to_s)
end
end