Class: Rails::Application

Inherits:
Engine
  • Object
show all
Defined in:
common/rails_config_bug_workaround.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) initialize!(group = :default)

Initialize the application passing the given group. By default, the group is :default but sprockets precompilation passes group equals to assets if initialize_on_precompile is false to avoid booting the whole app.



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'common/rails_config_bug_workaround.rb', line 9

def initialize!(group=:default) #:nodoc:
  raise "Application has been already initialized." if @initialized
  run_initializers(group, self)
  @initialized = true

  if config.allow_concurrency
    # Force lazy initialization to avoid concurrent racing conditions
    $stderr.puts("Forcing Rails configuration")
    env_config
  end

  self
end