aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/paths.rb
diff options
context:
space:
mode:
authorYehuda Katz and Carl Lerche <wycats@gmail.com>2009-03-23 18:06:47 -0700
committerYehuda Katz and Carl Lerche <wycats@gmail.com>2009-03-23 18:06:47 -0700
commit1d3e2c2b7333c90f2ef26fd0a3c6184aeaeb7e8a (patch)
tree35ae0a1a2e8cd0ed3a105fbc08ddcc08014cb976 /actionpack/lib/action_view/paths.rb
parenta501638e9dcf55e45613637c52e4169b6324f285 (diff)
downloadrails-1d3e2c2b7333c90f2ef26fd0a3c6184aeaeb7e8a.tar.gz
rails-1d3e2c2b7333c90f2ef26fd0a3c6184aeaeb7e8a.tar.bz2
rails-1d3e2c2b7333c90f2ef26fd0a3c6184aeaeb7e8a.zip
In the middle of some refactoring... some fails due to changes in AbstractController not yet reflected in ActionController tests
Diffstat (limited to 'actionpack/lib/action_view/paths.rb')
-rw-r--r--actionpack/lib/action_view/paths.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/paths.rb b/actionpack/lib/action_view/paths.rb
index 2a1ba3e895..6c6d2ff979 100644
--- a/actionpack/lib/action_view/paths.rb
+++ b/actionpack/lib/action_view/paths.rb
@@ -46,6 +46,15 @@ module ActionView #:nodoc:
extension ||= []
raise ActionView::MissingTemplate.new(self, "#{prefix}/#{path}.{#{extension.join(",")}}")
end
+
+ def find_by_parts?(path, extension = nil, prefix = nil, partial = false)
+ template_path = path.sub(/^\//, '')
+
+ each do |load_path|
+ return true if template = load_path.find_by_parts(template_path, extension, prefix, partial)
+ end
+ false
+ end
def find_template(original_template_path, format = nil)
return original_template_path if original_template_path.respond_to?(:render)