import Ember from 'ember';

const {
  Route,
  inject: {
    service
  }
} = Ember;

export default Route.extend({
  logger: service(),
  smt: service(),

  beforeModel() {
    // See a list of allowed types in logger.js
    // Add or remove all your log types here:
    // this.get('logger').addToLogs('message');
    // this.get('logger').removeFromLogs('join');
  },

  model() {
    this.get('smt').loadFixtures();
  },

  actions: {

    menu(which, what) {
      let menuProp = `show${which.capitalize()}Menu`;

      switch(what) {
        case 'show':
          this.controller.set(menuProp, true);
          break;
        case 'hide':
          this.controller.set(menuProp, false);
          break;
        case 'toggle':
          this.controller.toggleProperty(menuProp);
          break;
      }
    },

  }

});

import Ember from 'ember';

const {
  Route,
  inject: {
    service
  }
} = Ember;

export default Route.extend({
  logger: service(),
  smt: service(),

  beforeModel() {
    this._super(...arguments);
    // See a list of allowed types in logger.js
    // Add or remove all your log types here:
    // this.get('logger').addToLogs('message');
    // this.get('logger').removeFromLogs('join');
  },

  model() {
    this.get('smt').loadFixtures();
  },

  actions: {

    menu(which, what) {
      let menuProp = `show${which.capitalize()}Menu`;

      switch(what) {
        case 'show':
          this.controller.set(menuProp, true);
          break;
        case 'hide':
          this.controller.set(menuProp, false);
          break;
        case 'toggle':
          this.controller.toggleProperty(menuProp);
          break;
      }
    },

  }

});

Call _super in beforeModel hook
Call _super in beforeModel hook
