import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';

export default Ember.Route.extend(
    ApplicationRouteMixin, {
    beforeModel: function () {
        return this.csrf.fetchToken();
    }
});

import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';

export default Ember.Route.extend(
    ApplicationRouteMixin, {
    beforeModel: function () {
        this._super.apply(this, arguments);
        return this.csrf.fetchToken();
    }
});

Call super in beforeModel hook
Call super in beforeModel hook

Use super to call the application routes beforeModel hook so the
ApplicationRouteMixin works.
