Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Initialize user model in route with empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
hypernikao committed Jun 6, 2017
1 parent 04473e4 commit 7350c47
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion live/app/routes/inscription.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import Ember from 'ember';

export default Ember.Route.extend({

model() {
return this.store.createRecord('user');
// XXX: Model needs to be initialize with empty to handle validations on all fields from Api
return this.store.createRecord('user', {
lastName: '',
firstName: '',
email: '',
password: '',
cgu: false
});
},

actions: {
Expand Down

0 comments on commit 7350c47

Please sign in to comment.