Skip to content

Commit

Permalink
force lowercase entity names to avoid wrong path issues in linux
Browse files Browse the repository at this point in the history
  • Loading branch information
tunecino committed Jul 26, 2017
1 parent f464f06 commit 9053675
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generators/crud/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function getSearchModelClass($entity)

protected function getbaseViewPath($entity)
{
return $this->baseViewPath . '\\' . ucfirst($entity->name);
return $this->baseViewPath . '\\' . $entity->name;
}


Expand Down
3 changes: 2 additions & 1 deletion models/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ public function attributes()
public function rules()
{
return [
[['name', 'schema_id'], 'filter', 'filter' => 'trim'],
[['name'], 'required'],
[['name'], 'filter', 'filter' => 'strtolower'],
[['name', 'schema_id'], 'filter', 'filter' => 'trim'],
[['name'], 'match', 'pattern' => '/^\w+$/', 'message' => 'Only word characters are allowed.'],
[['name'], 'validateKeyword', 'skipOnEmpty' => false],
['schema_id', 'string'],
Expand Down

0 comments on commit 9053675

Please sign in to comment.