Module: ActionView::ViewPaths::ClassMethods
- Defined in:
- lib/action_view/view_paths.rb,
lib/action_view/view_paths.rb
Instance Method Summary collapse
-
#_prefixes ⇒ Object
:nodoc:.
-
#append_view_path(path) ⇒ Object
Append a path to the list of view paths for this controller.
-
#prepend_view_path(path) ⇒ Object
Prepend a path to the list of view paths for this controller.
-
#view_paths ⇒ Object
A list of all of the default view paths for this controller.
-
#view_paths=(paths) ⇒ Object
Set the view paths.
Instance Method Details
#_prefixes ⇒ Object
:nodoc:
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/action_view/view_paths.rb', line 17 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 |
#append_view_path(path) ⇒ Object
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)
82 83 84 |
# File 'lib/action_view/view_paths.rb', line 82 def append_view_path(path) self._view_paths = view_paths + Array(path) end |
#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)
92 93 94 |
# File 'lib/action_view/view_paths.rb', line 92 def prepend_view_path(path) self._view_paths = ActionView::PathSet.new(Array(path) + view_paths) end |
#view_paths ⇒ Object
A list of all of the default view paths for this controller.
97 98 99 |
# File 'lib/action_view/view_paths.rb', line 97 def view_paths _view_paths end |
#view_paths=(paths) ⇒ Object
Set the view paths.
Parameters
-
paths
- If a PathSet is provided, use that; otherwise, process the parameter into a PathSet.
106 107 108 |
# File 'lib/action_view/view_paths.rb', line 106 def view_paths=(paths) self._view_paths = ActionView::PathSet.new(Array(paths)) end |