framework/ember/app/routes/user.js
2015-03-12 12:59:32 +10:30

14 lines
260 B
JavaScript

import Ember from 'ember';
export default Ember.Route.extend({
model: function(params) {
return this.store.find('user', params.username);
},
afterModel: function(model) {
if (!model.get('joinTime')) {
return model.reload();
}
}
});