initialize_framework_views()
public
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.
Show source
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