Method: ActionView::ViewPaths::ClassMethods#prepend_view_path

Defined in:
actionview/lib/action_view/view_paths.rb

#prepend_view_path(path) ⇒ Object

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::PathSet for more information)


47
48
49
# File 'actionview/lib/action_view/view_paths.rb', line 47

def prepend_view_path(path)
  self._view_paths = ActionView::PathSet.new(Array(path) + view_paths)
end