Skip to content

Commit 67bf0b0

Browse files
JonForestrunspired
authored andcommitted
[BUGFIX blueprints] Add parans to the attr decorator when there is no transform type (#6054)
1 parent 490a5e0 commit 67bf0b0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/-ember-data/blueprints/model/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function nativeAttr(attr) {
142142
result = "@hasMany('" + name + "')";
143143
}
144144
} else if (type === '') {
145-
result = '@attr';
145+
result = '@attr()';
146146
} else {
147147
result = "@attr('" + type + "')";
148148
}

packages/-ember-data/node-tests/blueprints/model-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ describe('Acceptance: generate and destroy model blueprints', function() {
397397
.to.contain("import DS from 'ember-data';")
398398
.to.contain('const { Model, attr } = DS;')
399399
.to.contain('export default class FooModel extends Model {')
400-
.to.contain(' @attr misc;')
400+
.to.contain(' @attr() misc;')
401401
.to.contain(" @attr('array') skills;")
402402
.to.contain(" @attr('boolean') isActive;")
403403
.to.contain(" @attr('date') birthday;")

0 commit comments

Comments
 (0)