module ActionView::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::PathSet for more information)
# 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)
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::PathSet for more information)
# 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()
click to toggle source
A list of all of the default view paths for this controller.
# File lib/action_view/view_paths.rb, line 97 def view_paths _view_paths end
Private Instance Methods
handle_deprecated_parent_prefixes()
click to toggle source
# File lib/action_view/view_paths.rb, line 38 def handle_deprecated_parent_prefixes # TODO: remove in 4.3/5.0. return unless respond_to?(:parent_prefixes) ActiveSupport::Deprecation.warn(" Overriding `ActionController::Base::parent_prefixes` is deprecated, override `.local_prefixes` instead. ".squish) local_prefixes + parent_prefixes end
local_prefixes()
click to toggle source
Override this method in your controller if you want to change paths
prefixes for finding views. Prefixes defined here will still be added to
parents' ._prefixes
.
# File lib/action_view/view_paths.rb, line 34 def local_prefixes [controller_path] end