helping CompileAssets to work

This commit is contained in:
Parziphal 2013-10-27 00:51:15 -05:00
parent cb1f338d27
commit 4d2a7afd38

View File

@ -9,7 +9,17 @@ class CompileAssets
{
static public function compile()
{
require __DIR__ . '/../../config/boot.php';
$railsRoot = __DIR__ . '/../..';
# Create temporary config/config.php file
$file = $railsRoot . '/config/config.php.example';
$target = $railsRoot . '/config/config.php';
copy($file, $target);
require $railsRoot . '/config/boot.php';
\Rails::assets()->compileAll();
# Delete temporary config file.
unlink($target);
}
}