123456789_123456789_123456789_123456789_123456789_

Module: ActionView::ViewPaths::ClassMethods

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#view_paths (rw)

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

[ GitHub ]

  
# File 'actionview/lib/action_view/view_paths.rb', line 91

def view_paths
  _view_paths
end

#view_paths=(paths) (rw)

Set the view paths.

Parameters

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

[ GitHub ]

  
# File 'actionview/lib/action_view/view_paths.rb', line 100

def view_paths=(paths)
  self._view_paths = ActionView::PathSet.new(Array(paths))
end

Instance Method Details

#append_view_path(path)

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

[ GitHub ]

  
# File 'actionview/lib/action_view/view_paths.rb', line 76

def append_view_path(path)
  self._view_paths = view_paths + Array(path)
end

#prepend_view_path(path)

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)

[ GitHub ]

  
# File 'actionview/lib/action_view/view_paths.rb', line 86

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