title: Reference controller from Mixin
body: <p>A simple question, can I get a reference to a controller from a mixin in ember?</p>
  
  <p>I have an ApplicationController where I set values retrieved via ember-data, I want to reference these values from a Mixin. I could not find anything so my assumption is there is no API for this?</p>
  
  <pre><code>App.Searchable = Ember.Mixin.create({
      search: function () {
          if (this.isValid()) {
              var controller = this.controllerFor('application');
              return controller.getProperties('fromDate', 'toDate', 'brokers', 'locations');
          }
          else
              return this.isInvalid;
      },
      isValid: function () {
          var controller = this.controllerFor('search');
          var fromDate = moment(this.get('fromDate'), 'YYYY-MM-DD');
          var toDate = moment(this.get('toDate'), 'YYYY-MM-DD');
          return moment(fromDate).isBefore(toDate) || moment(fromDate).isSame(toDate);
      },
      isInvalid: function () {
          $("#date-range-error").show();
      }
  });
  
  App.PnlRoute = Ember.Route.extend(App.Searchable, {
      model: function () {
          return this.store.find('pnl', this.search());
      },
      renderTemplate: function () {
          this.render('pnl', {
              into: 'application',
              outlet: 'data',
              controller: 'pnl'
          });
      },
      actions: {
          filter: function () {
              this.controllerFor('pnl').set('model', this.store.find('pnl', this.search()));
          }
      }
  });
  
  App.ApplicationController = Ember.ArrayController.extend({
      title: 'Pnl',
      fromDate: null,
      toDate: null,
      locations: [],
      ccyPairs: [],
      brokers: [],
      init: function () {
          var self = this;
          this.store.find('date').then(function (result) {
              var date = result.objectAt(0);
              self.set('fromDate', date.get('from'));
              self.set('toDate', date.get('to'));
          }), function (error) {
              $("#date-init-error").show();
          };
      }
  });
  </code></pre>