module TrustyCms::Initializer
def initialize_framework_views
so that new extension paths are noticed without a restart.
In environments that don't cache templates it reloads the path set on each request,
This adds extension view paths to the standard Rails::Initializer method.
def initialize_framework_views view_paths = extension_loader.paths(:view) #.push(TrustyCms::Application.config.view_path) if ActionController::Base.view_paths.count == 0 || !ActionView::Base.cache_template_loading ActionController::Base.view_paths = ActionView::PathSet.new(Array.wrap(view_paths)) end if ActionMailer::Base.view_paths.count == 0 || !ActionView::Base.cache_template_loading ActionMailer::Base.view_paths = ActionView::PathSet.new(Array.wrap(view_paths)) end end