instance method initialize_framework_views

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

initialize_framework_views()

Sets +ActionController::Base#view_paths+ and +ActionMailer::Base#template_root+ (but only for those frameworks that are to be loaded). If the framework’s paths have already been set, it is not changed, otherwise it is set to use Configuration#view_path.

Source
# File railties/lib/initializer.rb, line 457
    def initialize_framework_views
      if configuration.frameworks.include?(:action_view)
        view_path = ActionView::PathSet::Path.new(configuration.view_path, false)
        ActionMailer::Base.template_root ||= view_path if configuration.frameworks.include?(:action_mailer)
        ActionController::Base.view_paths = view_path if configuration.frameworks.include?(:action_controller) && ActionController::Base.view_paths.empty?
      end
    end

Defined in railties/lib/initializer.rb line 457 · 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