instance method
initialize_framework_views
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available 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 521
def initialize_framework_views
if configuration.frameworks.include?(:action_view)
view_path = ActionView::PathSet.type_cast(configuration.view_path)
ActionMailer::Base.template_root = view_path if configuration.frameworks.include?(:action_mailer) && ActionMailer::Base.view_paths.blank?
ActionController::Base.view_paths = view_path if configuration.frameworks.include?(:action_controller) && ActionController::Base.view_paths.blank?
end
end
Defined in railties/lib/initializer.rb line 521
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Initializer