Permalink
Browse files

tighten handler regexp

  • Loading branch information...
1 parent f5832bc commit 23b3a605d44144eb15dc731d238e9009ce4c6528 Sven Fuchs committed Jan 18, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/minimal/template/handler.rb
@@ -15,8 +15,8 @@ def compile(template)
protected
def template_class_name_and_format(path)
- %r(views/(.*?)(\.[^\.]*)?.rb) =~ path
+ %r((?:^|/)views/(.*?)(\.[^\.]*)?.rb) =~ path
[$1.try(:camelize), ($2 || 'html').gsub('.', '').to_sym]
end
end
-end
+end

0 comments on commit 23b3a60

Please sign in to comment.