Module: AbstractController::ViewPaths::ClassMethods
- Defined in:
- actionpack/lib/abstract_controller/view_paths.rb
Instance Method Summary (collapse)
-
- (Object) append_view_path(path)
Append a path to the list of view paths for this controller.
-
- (Object) prepend_view_path(path)
Prepend a path to the list of view paths for this controller.
-
- (Object) view_paths
A list of all of the default view paths for this controller.
-
- (Object) view_paths=(paths)
Set the view paths.
Instance Method Details
- (Object) 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::ViewPathSet for more information)
40 41 42 |
# File 'actionpack/lib/abstract_controller/view_paths.rb', line 40 def append_view_path(path) self.view_paths = view_paths.dup + Array(path) end |
- (Object) 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::ViewPathSet for more information)
50 51 52 |
# File 'actionpack/lib/abstract_controller/view_paths.rb', line 50 def prepend_view_path(path) self.view_paths = Array(path) + view_paths.dup end |
- (Object) view_paths
A list of all of the default view paths for this controller.
55 56 57 |
# File 'actionpack/lib/abstract_controller/view_paths.rb', line 55 def view_paths _view_paths end |
- (Object) view_paths=(paths)
Set the view paths.
Parameters
-
paths - If a ViewPathSet is provided, use that; otherwise, process the parameter into a ViewPathSet.
64 65 66 67 |
# File 'actionpack/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 |