Skip to content

Commit

Permalink
[BUGFIX blueprints] Add parans to the attr decorator when there is no…
Browse files Browse the repository at this point in the history
… transform type (#6054)
  • Loading branch information
JonForest authored and runspired committed Apr 23, 2019
1 parent 490a5e0 commit 67bf0b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/-ember-data/blueprints/model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function nativeAttr(attr) {
result = "@hasMany('" + name + "')";
}
} else if (type === '') {
result = '@attr';
result = '@attr()';
} else {
result = "@attr('" + type + "')";
}
Expand Down
2 changes: 1 addition & 1 deletion packages/-ember-data/node-tests/blueprints/model-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ describe('Acceptance: generate and destroy model blueprints', function() {
.to.contain("import DS from 'ember-data';")
.to.contain('const { Model, attr } = DS;')
.to.contain('export default class FooModel extends Model {')
.to.contain(' @attr misc;')
.to.contain(' @attr() misc;')
.to.contain(" @attr('array') skills;")
.to.contain(" @attr('boolean') isActive;")
.to.contain(" @attr('date') birthday;")
Expand Down

0 comments on commit 67bf0b0

Please sign in to comment.