fixes on assets
This commit is contained in:
parent
a70f9cbfdb
commit
f4c03a4a80
@ -38,7 +38,7 @@ class ModelSchema
|
|||||||
|
|
||||||
public function schemaFile()
|
public function schemaFile()
|
||||||
{
|
{
|
||||||
$path = Rails::root() . '/db/table_schema/' . $this->connection_name();
|
$path = Rails::root() . '/db/table_schema/' . $this->connection->name();
|
||||||
$file = $path . '/' . $this->name . '.php';
|
$file = $path . '/' . $this->name . '.php';
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ class ModelSchema
|
|||||||
$this->loadCachedSchema();
|
$this->loadCachedSchema();
|
||||||
} elseif (!$this->getSchema()) {
|
} elseif (!$this->getSchema()) {
|
||||||
throw new Exception\RuntimeException(
|
throw new Exception\RuntimeException(
|
||||||
sprintf("Couldn't find schema for %s: %s", $this->name, $this->error_stmt)
|
sprintf("Couldn't find schema for %s", $this->name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,6 +93,12 @@ class AdminController extends ApplicationController
|
|||||||
Rails\Assets\Parser\Javascript\ClosureApi\ClosureApi::errorFile(), $e->getMessage());
|
Rails\Assets\Parser\Javascript\ClosureApi\ClosureApi::errorFile(), $e->getMessage());
|
||||||
|
|
||||||
$this->error = $message;
|
$this->error = $message;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
/**
|
||||||
|
* If another error occurs, it won't be properly shown because of production config.
|
||||||
|
*/
|
||||||
|
Rails::resetConfig('development');
|
||||||
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rails::resetConfig('development');
|
Rails::resetConfig('development');
|
||||||
|
@ -130,14 +130,11 @@ final class Rails
|
|||||||
|
|
||||||
$prefix = str_replace('\\', '/', self::$config->assets->prefix);
|
$prefix = str_replace('\\', '/', self::$config->assets->prefix);
|
||||||
|
|
||||||
$router = self::application()->router();
|
|
||||||
if (!$router || !$router->route() || !$router->route()->isPanelRoute()) {
|
|
||||||
$basePaths = [
|
$basePaths = [
|
||||||
str_replace('\\', '/', Rails::config()->paths->application) . $prefix,
|
str_replace('\\', '/', Rails::config()->paths->application) . $prefix,
|
||||||
str_replace('\\', '/', Rails::root() . '/lib') . $prefix,
|
str_replace('\\', '/', Rails::root() . '/lib') . $prefix,
|
||||||
str_replace('\\', '/', Rails::root() . '/vendor') . $prefix,
|
str_replace('\\', '/', Rails::root() . '/vendor') . $prefix,
|
||||||
];
|
];
|
||||||
}
|
|
||||||
|
|
||||||
$paths = [];
|
$paths = [];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user