Sha256: 984faf3d2181f8c20c5ae806a90906b4d8499f54995e329ce249f6ede693f676

Contents?: true

Size: 591 Bytes

Versions: 29

Compression:

Stored size: 591 Bytes

Contents

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.include?(field.to_s)
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hackathon_manager-0.13.12 lib/hackathon_manager.rb
hackathon_manager-0.13.11 lib/hackathon_manager.rb
hackathon_manager-0.13.10 lib/hackathon_manager.rb
hackathon_manager-0.13.9 lib/hackathon_manager.rb
hackathon_manager-0.13.8 lib/hackathon_manager.rb
hackathon_manager-0.13.7 lib/hackathon_manager.rb
hackathon_manager-0.13.6 lib/hackathon_manager.rb
hackathon_manager-0.13.5 lib/hackathon_manager.rb
hackathon_manager-0.13.4 lib/hackathon_manager.rb
hackathon_manager-0.13.3 lib/hackathon_manager.rb
hackathon_manager-0.13.2 lib/hackathon_manager.rb
hackathon_manager-0.13.1 lib/hackathon_manager.rb
hackathon_manager-0.13.0 lib/hackathon_manager.rb
hackathon_manager-0.12.2 lib/hackathon_manager.rb
hackathon_manager-0.12.1 lib/hackathon_manager.rb
hackathon_manager-0.12.0 lib/hackathon_manager.rb
hackathon_manager-0.11.2 lib/hackathon_manager.rb
hackathon_manager-0.11.1 lib/hackathon_manager.rb
hackathon_manager-0.11.0 lib/hackathon_manager.rb
hackathon_manager-0.10.3 lib/hackathon_manager.rb