lib/hackathon_manager.rb in hackathon_manager-0.4.2 vs lib/hackathon_manager.rb in hackathon_manager-0.4.3

- old
+ new

@@ -1,5 +1,15 @@ require "hackathon_manager/engine" module HackathonManager - # Your code goes here... + 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 DateTime + if hackathon['last_day_to_apply'].is_a?(String) + hackathon['last_day_to_apply'] = DateTime.parse(hackathon['last_day_to_apply']) + end + + app.config.hackathon = hackathon + end end