Class: RailsConfig::Rack::Reloader

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_config/rack/reloader.rb

Overview

Rack middleware the reloads RailsConfig on every request (only use in dev mode)

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Reloader

Returns a new instance of Reloader.



5
6
7
# File 'lib/rails_config/rack/reloader.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
# File 'lib/rails_config/rack/reloader.rb', line 9

def call(env)
  RailsConfig.reload!
  @app.call(env)
end