提交 80715cee 编写于 作者: J José Valim

Define to_s method in ActionView::Resolver, so I'm not required to write it in inherited classes.

上级 57cf1c57
......@@ -29,11 +29,11 @@ def initialize(options = {})
@cached = {}
end
# Normalizes the arguments and passes it on to find_template
def find(*args)
find_all(*args).first
end
# Normalizes the arguments and passes it on to find_template
def find_all(name, details = {}, prefix = nil, partial = nil)
details = normalize_details(details)
name, prefix = normalize_name(name, prefix)
......@@ -43,6 +43,10 @@ def find_all(name, details = {}, prefix = nil, partial = nil)
end
end
def to_s
self.class.name
end
private
# This is what child classes implement. No defaults are needed
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册