diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-05 15:40:06 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-05 15:40:06 +0100 |
commit | 80715cee73856d0ccade7b912b1e6a0aa5ca135b (patch) | |
tree | bfa38a3fecb4769a2cc25ad59eaef08d9b25f1aa | |
parent | 57cf1c578a5a3823ae280cf786c1d2ec71001ba8 (diff) | |
download | rails-80715cee73856d0ccade7b912b1e6a0aa5ca135b.tar.gz rails-80715cee73856d0ccade7b912b1e6a0aa5ca135b.tar.bz2 rails-80715cee73856d0ccade7b912b1e6a0aa5ca135b.zip |
Define to_s method in ActionView::Resolver, so I'm not required to write it in inherited classes.
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |