title: EmberJS actions - call one action from another when wrapped within `actions`
body: <p>How do you call one action from another action when wrapped within <code>actions</code> in an EmberJS controller?</p>
  
  <p>Original code that uses the now deprecated way to define actions:</p>
  
  <pre><code>//app.js
  App.IndexController = Ember.ArrayController.extend({
      // properties
      /* ... */
  
      // actions
      actionFoo: function() {
          /* ... */
          this.actionBar();
      },
      actionBar: function() {
          /* ... */
      }
  });
  
  //app.html
  &lt;div class="foo" {{action actionFoo this}}&gt;
  &lt;div class="bar" {{action actionBar this}}&gt;
  </code></pre>
  
  <p>However, with EmberJS 1.0.0, we get a deprecation warning, saying that actions must be put within an actions object within the controller, instead of directly within the controller, as above.</p>
  
  <p>Updating the code, according to recommendations:</p>
  
  <pre><code>//app.js
  App.IndexController = Ember.ArrayController.extend({
      // properties
      /* ... */
  
      // actions
      actions: {
          actionFoo: function() {
              /* ... */
              this.actionBar(); //this.actionBar is undefined
              // this.actions.actionBar(); //this.actions is undefined
          },
          actionBar: function() {
              /* ... */
          }
      }
  });
  
  //app.html
  &lt;div class="foo" {{action actionFoo this}}&gt;
  &lt;div class="bar" {{action actionBar this}}&gt;
  </code></pre>
  
  <p>However, I find that it is not possible for one function defined within actions to call another, as the <code>this</code> object appears to no longer be the controller.</p>
  
  <p>How can I go about doing this?</p>