aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-11-11 19:17:31 -0500
committerGitHub <noreply@github.com>2016-11-11 19:17:31 -0500
commit5647d85440c0f828a58088562c15c8cea368f59c (patch)
tree4ddf898de43049546a71856aec5a5fb7a6698448
parentdf3c1eef11f08ea6794629a8167e7c0ed57000e5 (diff)
parent60355871645ce35de940587209125580008cb840 (diff)
downloadrails-5647d85440c0f828a58088562c15c8cea368f59c.tar.gz
rails-5647d85440c0f828a58088562c15c8cea368f59c.tar.bz2
rails-5647d85440c0f828a58088562c15c8cea368f59c.zip
Merge pull request #27018 from alexanderkustov/alexanderkustov/update-docs-ActionView
better docs for ActionView::ViewPaths#prepend_view_path [ci skip]
-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