title: In an Ember route how can I check if an action exists?
body: <p>In a component it is really easy to have an optional action provided to the component. In the JS of the component I can write:</p>
  
  <pre><code>if (this.get('someAction')) {
    this.sendAction('someAction');
  }
  </code></pre>
  
  <p>In my application route I have a 'generic action' that saves me providing widget components with long lists of actions, it looks like this:</p>
  
  <pre><code>genericAction: function(customActionName, customActionParams) {
    this.send(customActionName, customActionParams);
  }
  </code></pre>
  
  <p>For various reasons (including using genericAction in some components to fire an action a test could subscribe to, but the app not necessarily use in some hard to test async/pretender workflows) I would prefer to check the action exists, i.e:</p>
  
  <pre><code>genericAction: function(customActionName, customActionParams) {
    if (this.get(customActionName)) {
      this.send(customActionName, customActionParams);
    }
  }
  </code></pre>
  
  <p>Similar to how you can in a component, however this does not work, nor does <code>this.controller.get(customActionName)</code>.</p>
  
  <p>Other than keeping a hard coded list of actions, how can I achieve this?</p>