Permalink
Browse files

New standard: use_in_file_templates uses @@ mytemplate for lookup

i.e.

no more:

  ## index

is now:

  @@ index

This is is to help confusion when using Haml and looks better in pastie ;)
  • Loading branch information...
bmizerany committed Apr 27, 2008
1 parent d16ee65 commit 1987e55049132d35377c16a41f5c66d9f469bb95
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/sinatra.rb
  2. +2 −2 test/use_in_file_templates_test.rb
View
@@ -1127,7 +1127,7 @@ def use_in_file_templates!
data = StringIO.new(templates)
current_template = nil
data.each do |line|
- if line =~ /^##\s?(.*)/
+ if line =~ /^@@\s?(.*)/
current_template = $1.to_sym
Sinatra.application.templates[current_template] = ''
elsif current_template
@@ -38,10 +38,10 @@
__END__
-## foo
+@@ foo
this is foo
-## layout
+@@ layout
X
= yield
X

0 comments on commit 1987e55

Please sign in to comment.