From 80715cee73856d0ccade7b912b1e6a0aa5ca135b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 5 Mar 2010 15:40:06 +0100 Subject: Define to_s method in ActionView::Resolver, so I'm not required to write it in inherited classes. --- actionpack/lib/action_view/template/resolver.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/template/resolver.rb') diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index 20402f9d6d..962fa0e260 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -29,11 +29,11 @@ module ActionView @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 @@ module ActionView end end + def to_s + self.class.name + end + private # This is what child classes implement. No defaults are needed -- cgit v1.2.3