Skip to content

Commit

Permalink
Make the autoloader only work the mustache-directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
hanseartic committed Oct 5, 2012
1 parent 4a70fc1 commit dfc10a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Views/Mustache.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Mustache extends \Slim\View
public function render($template)
{
require_once self::$mustacheDirectory . '/Autoloader.php';
\Mustache_Autoloader::register();
\Mustache_Autoloader::register(dirname(self::$mustacheDirectory));
$m = new \Mustache_Engine();
$contents = file_get_contents($this->getTemplatesDirectory() . '/' . ltrim($template, '/'));
return $m->render($contents, $this->data);
Expand Down

0 comments on commit dfc10a5

Please sign in to comment.