frontend/app/routes/user/groups.js
import Ember from 'ember';
import Paginated from '../../mixins/paginated';
import setTitle from '../../utils/set-title';
export default Ember.Route.extend(Paginated, {
fetchPage: function(page) {
return this.store.find('group', {
user_id: this.modelFor('user').get('id'),
page: page
});
},
afterModel: function() {
return setTitle(this.modelFor('user').get('username') + "'s Groups");
}
});