module AbstractController::ViewPaths::ClassMethods

Public Instance Methods

append_view_path(path) click to toggle source

Append a path to the list of view paths for this controller.

Parameters

  • path - If a String is provided, it gets converted into the default view path. You may also provide a custom view path (see ActionView::ViewPathSet for more information)

# File lib/abstract_controller/view_paths.rb, line 40
def append_view_path(path)
  self.view_paths = view_paths.dup + Array(path)
end
prepend_view_path(path) click to toggle source

Prepend a path to the list of view paths for this controller.

Parameters

  • path - If a String is provided, it gets converted into the default view path. You may also provide a custom view path (see ActionView::ViewPathSet for more information)

# File lib/abstract_controller/view_paths.rb, line 50
def prepend_view_path(path)
  self.view_paths = Array(path) + view_paths.dup
end
view_paths() click to toggle source

A list of all of the default view paths for this controller.

# File lib/abstract_controller/view_paths.rb, line 55
def view_paths
  _view_paths
end
view_paths=(paths) click to toggle source

Set the view paths.

Parameters

  • paths - If a ViewPathSet is provided, use that; otherwise, process the parameter into a ViewPathSet.

# File lib/abstract_controller/view_paths.rb, line 64
def view_paths=(paths)
  self._view_paths = ActionView::Base.process_view_paths(paths)
  self._view_paths.freeze
end