Skip to content

Commit

Permalink
reuse getForeignKey in getForeignKeyArray method in BelongsTo class (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Azdaroth authored and samselikoff committed Sep 3, 2016
1 parent 1fef419 commit d312e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/orm/associations/belongs-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class BelongsTo extends Association {
The belongsTo association adds a fk to the owner of the association
*/
getForeignKeyArray() {
return [camelize(this.ownerModelName), `${camelize(this.key)}Id`];
return [camelize(this.ownerModelName), this.getForeignKey()];
}

getForeignKey() {
Expand Down

0 comments on commit d312e51

Please sign in to comment.