instance method set_autoload_paths

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

set_autoload_paths()

Set the paths from which Rails will automatically load source files, and the load_once paths.

Source
# File railties/lib/initializer.rb, line 248
    def set_autoload_paths
      ActiveSupport::Dependencies.autoload_paths = configuration.autoload_paths.uniq
      ActiveSupport::Dependencies.autoload_once_paths = configuration.autoload_once_paths.uniq

      extra = ActiveSupport::Dependencies.autoload_once_paths - ActiveSupport::Dependencies.autoload_paths
      unless extra.empty?
        abort <<-end_error
          autoload_once_paths must be a subset of the autoload_paths.
          Extra items in autoload_once_paths: #{extra * ','}
        end_error
      end

      # Freeze the arrays so future modifications will fail rather than do nothing mysteriously
      configuration.autoload_once_paths.freeze
    end

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

Defined in Rails::Initializer

Type at least 2 characters to search.

↑↓ navigate · open · esc close