decide.nolog.cz/app/routes/create/meta.js
2014-07-06 17:37:54 +02:00

12 lines
No EOL
310 B
JavaScript

export default Ember.Route.extend({
model: function(){
return this.modelFor('create');
},
// redirect to create/index if poll type is not set
afterModel: function(create){
if (create.get('pollType') === null) {
this.transitionTo('create.index');
}
}
});