instance method to_prepare

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

to_prepare(&callback)

Add a preparation callback that will run before every request in development mode, or before the first request in production.

See Dispatcher#to_prepare.

Parameters

callback block
Source
# File railties/lib/initializer.rb, line 850
    def to_prepare(&callback)
      after_initialize do
        require 'dispatcher' unless defined?(::Dispatcher)
        Dispatcher.to_prepare(&callback)
      end
    end

Defined in railties/lib/initializer.rb line 850 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Configuration

Type at least 2 characters to search.

↑↓ navigate · open · esc close