title: ember-cli: creating a helper that would render a view?
body: <p>I'm trying to reproduce Ember-TodoMVC with ember-cli. I'm stuck with <a href="http://emberjs.com/guides/getting-started/accepting-edits/" rel="nofollow">this part</a>.</p>
  
  <p>I've created a view like this:</p>
  
  <h3>app/views/action-edit.coffee</h3>
  
  <pre><code>ActionEditView = Ember.TextField.extend
    didInsertElement: -&gt; @$().focus()
  
  `export default ActionEditView`
  </code></pre>
  
  <p>When i use it in an Emblem template directly, e. g. <code>view "action-view"</code>, it works fine: a text field is rendered.</p>
  
  <p>But emberjs.com/guides suggests creating a helper to render the view.</p>
  
  <p>I found this remark: "Remember that you must register your helpers by exporting makeBoundHelper" on ember-cli website. After fiddling for a while struggling to understand how ES6 modules work, i ended up with this code that does not produce any JS errors:</p>
  
  <h3>app/helpers/action-edit.coffee</h3>
  
  <pre><code>`import ActionEditView from 'loltodo/views/action-edit'`
  
  `export default Ember.Handlebars.makeBoundHelper(ActionEditView)`
  </code></pre>
  
  <p>When i use it like this in an Emblem template: <code>action-edit</code>, Ember outputs this in browser console:</p>
  
  <blockquote>
    <p>[✓] helper:action-edit ......................................... loltodo/helpers/action-edit vendor/ember/ember.js:3521</p>
  </blockquote>
  
  <p>So i assume the helper gets hooked up fine.</p>
  
  <p>The problem is that it renders blank!</p>
  
  <p>I also tried this:</p>
  
  <h3>app/helpers/action-edit.coffee</h3>
  
  <pre><code>`import ActionEditView from 'loltodo/views/action-edit'`
  
  `export default Ember.Handlebars.helper('action-edit', ActionEditView)`
  </code></pre>
  
  <p>It results in error "undefined is not a function" in <a href="https://github.com/emberjs/ember.js/blob/v1.5.1/packages/ember-handlebars/lib/ext.js#L176" rel="nofollow">this line</a>.</p>
  
  <p>So the question is: how do i create a helper that render a view with ember-cli to reproduce <a href="http://emberjs.com/guides/getting-started/accepting-edits/" rel="nofollow">this step</a> of the Ember-TodoMVC tutorial? </p>