Skip to content
Browse files

Fix Mustache template adapter

Mustache changed template context(latest version doesn't use Hash).
So, if template file doesn't find, use Mustache::Context instead of Hash.
  • Loading branch information...
1 parent 6df728c commit 050a9494dde672432d2fb450feef9d3956233827 @repeatedly repeatedly committed Mar 12, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 examples/templates/template_mustache.rb
  2. +1 −1 lib/ramaze/view/mustache.rb
View
2 examples/templates/template_mustache.rb
@@ -18,7 +18,7 @@ def internal(*args)
%q{
<html>
<head>
- <title>Template::Mustache external</title>
+ <title>Template::Mustache internal</title>
</head>
<body>
<h1>{{header}}</h1>
View
2 lib/ramaze/view/mustache.rb
@@ -22,7 +22,7 @@ def self.call(action, string)
end
def self.class_defined?(action)
- return {}, nil, nil unless action.view
+ return ::Mustache::Context.new(nil), nil, nil unless action.view
path = File.dirname(action.view)

0 comments on commit 050a949

Please sign in to comment.
Something went wrong with that request. Please try again.