Skip to content

Commit

Permalink
Added type float and double in ngrest data types to use decimal. closes
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar committed May 2, 2017
1 parent 9d97be3 commit ba918b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file. This projec
- [#1227](https://github.com/luyadev/luya/issues/1227) Added preloadModels() method for the Menu Query in order to collect all models for the given request. This can strongly reduce the sql count when working with properties or models.
- [#1266](https://github.com/luyadev/luya/issues/1266) render() method for the mailer component in order to provide controller template files.
- [#1269](https://github.com/luyadev/luya/issues/1269) Add raw option for html block in order to render the html output in admin view.
- [#1215](https://github.com/luyadev/luya/issues/1215) Added type float and double in ngrest data types to use decimal.

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion core/console/commands/CrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public function generateModelContent($fileNamepsace, $className, $apiEndpoint, T
if ($v->type == 'integer' || $v->type == 'bigint' || $v->type == 'smallint') {
$ngrestFieldConfig[$v->name] = 'number';
}
if ($v->type == 'decimal') {
if ($v->type == 'decimal' || $v->type == 'float' || $v->type == 'double') {
$ngrestFieldConfig[$v->name] = 'decimal';
}
if ($v->type == 'boolean') {
Expand Down

0 comments on commit ba918b2

Please sign in to comment.