module ActionView::ViewPaths::ClassMethods
def _prefixes # :nodoc:
def _prefixes # :nodoc: @_prefixes ||= begin deprecated_prefixes = handle_deprecated_parent_prefixes if deprecated_prefixes deprecated_prefixes else return local_prefixes if superclass.abstract? local_prefixes + superclass._prefixes end end end
def append_view_path(path)
the default view path. You may also provide a custom view path
* path - If a String is provided, it gets converted into
==== Parameters
Append a path to the list of view paths for this controller.
def append_view_path(path) self._view_paths = view_paths + Array(path) end
def handle_deprecated_parent_prefixes # TODO: remove in 4.3/5.0.
def handle_deprecated_parent_prefixes # TODO: remove in 4.3/5.0. return unless respond_to?(:parent_prefixes) ActiveSupport::Deprecation.warn(<<-MSG.squish) Overriding `ActionController::Base::parent_prefixes` is deprecated, override `.local_prefixes` instead. MSG local_prefixes + parent_prefixes end
def local_prefixes
Override this method in your controller if you want to change paths prefixes for finding views.
def local_prefixes [controller_path] end
def prepend_view_path(path)
the default view path. You may also provide a custom view path
* path - If a String is provided, it gets converted into
==== Parameters
Prepend a path to the list of view paths for this controller.
def prepend_view_path(path) self._view_paths = ActionView::PathSet.new(Array(path) + view_paths) end
def view_paths
def view_paths _view_paths end
def view_paths=(paths)
* paths - If a PathSet is provided, use that;
==== Parameters
Set the view paths.
def view_paths=(paths) self._view_paths = ActionView::PathSet.new(Array(paths)) end