aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAlexander Kustov <knuxus@gmail.com>2016-11-11 17:31:20 +0000
committerAlexander Kustov <knuxus@gmail.com>2016-11-12 00:02:31 +0000
commit60355871645ce35de940587209125580008cb840 (patch)
tree7b550a8834f78f6901d3dfd24aea7d07c4597514 /actionview
parentcac3be6341f95c9a347d62173a4a130d1e42141b (diff)
downloadrails-60355871645ce35de940587209125580008cb840.tar.gz
rails-60355871645ce35de940587209125580008cb840.tar.bz2
rails-60355871645ce35de940587209125580008cb840.zip
better docs for ActionView::ViewPaths#prepend_view_path
✂️ extra line
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/view_paths.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionview/lib/action_view/view_paths.rb b/actionview/lib/action_view/view_paths.rb
index b5cde5b43f..a9638d1e6d 100644
--- a/actionview/lib/action_view/view_paths.rb
+++ b/actionview/lib/action_view/view_paths.rb
@@ -46,10 +46,22 @@ module ActionView
{}
end
+ # Append a path to the list of view paths for the current <tt>LookupContext</tt>.
+ #
+ # ==== Parameters
+ # * <tt>path</tt> - 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)
def append_view_path(path)
lookup_context.view_paths.push(*path)
end
+ # Prepend a path to the list of view paths for the current <tt>LookupContext</tt>.
+ #
+ # ==== Parameters
+ # * <tt>path</tt> - 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)
def prepend_view_path(path)
lookup_context.view_paths.unshift(*path)
end