提交 60355871 编写于 作者: A Alexander Kustov

better docs for ActionView::ViewPaths#prepend_view_path

️ extra line
上级 cac3be63
...@@ -46,10 +46,22 @@ def details_for_lookup ...@@ -46,10 +46,22 @@ def details_for_lookup
{} {}
end 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) def append_view_path(path)
lookup_context.view_paths.push(*path) lookup_context.view_paths.push(*path)
end 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) def prepend_view_path(path)
lookup_context.view_paths.unshift(*path) lookup_context.view_paths.unshift(*path)
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册