diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-12 14:25:10 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-12 14:25:10 +0100 |
commit | 2a12686832fbcf0566454904a5d733998506bf56 (patch) | |
tree | ef6da03a35679c59a1673694277f7d34a16fcc92 /actionpack/lib/action_view/lookup_context.rb | |
parent | 16846553b8866eab2aa3b128a2a23a221a25f7e3 (diff) | |
download | rails-2a12686832fbcf0566454904a5d733998506bf56.tar.gz rails-2a12686832fbcf0566454904a5d733998506bf56.tar.bz2 rails-2a12686832fbcf0566454904a5d733998506bf56.zip |
Allow anything that responds to render to be given as :template and use find_template instead of find in views.
Diffstat (limited to 'actionpack/lib/action_view/lookup_context.rb')
-rw-r--r-- | actionpack/lib/action_view/lookup_context.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/lookup_context.rb b/actionpack/lib/action_view/lookup_context.rb index 27ee8b23c9..22ab076b59 100644 --- a/actionpack/lib/action_view/lookup_context.rb +++ b/actionpack/lib/action_view/lookup_context.rb @@ -70,6 +70,7 @@ module ActionView def find(name, prefix = nil, partial = false) @view_paths.find(name, prefix, partial, details, details_key) end + alias :find_template :find def find_all(name, prefix = nil, partial = false) @view_paths.find_all(name, prefix, partial, details, details_key) @@ -78,6 +79,7 @@ module ActionView def exists?(name, prefix = nil, partial = false) @view_paths.exists?(name, prefix, partial, details, details_key) end + alias :template_exists? :exists? # Add fallbacks to the view paths. Useful in cases you are rendering a :file. def with_fallbacks |