title: Ember access model inside a controller
body: <p>How can a model be accessed from within a controller ? Currently using the below code returns a "undefined is not a function" (go figure JS fail...).</p>
  
  <p><strong>models/plan.js</strong></p>
  
  <pre><code>import DS from 'ember-data';
  
  export default DS.Model.extend({
      name:       DS.attr('string'),
      period:     DS.attr('number'),
      price:      DS.attr('number'),
  });
  </code></pre>
  
  <p><strong>routes/checkout.js</strong></p>
  
  <pre><code>import Ember from 'ember';
  
  export default Ember.Route.extend({
  
      model: function(params) {
          return this.store.find('plan', params.plan_id);
      }
  });
  </code></pre>
  
  <p><strong>controllers/checkout.js</strong></p>
  
  <pre><code>import Ember from 'ember';
  
  export default Ember.Controller.extend({
  
      submitPayment: function(error, result)
      {
            var plan = this.get('model');
      }
  }
  </code></pre>
  
  <p><strong>router.js</strong></p>
  
  <pre><code>Router.map(function() {
    this.route('checkout', {path: '/checkout/:plan_id'});
  });
  </code></pre>