title: Using Rails helper in Angular template
body: <p>I am using Rails with AngularJS and I would like to use rails helper and erb-style <code>if</code> statement in an Angular template.</p>
  
  <p>I am displaying a delete button and want to make sure only the owner can see this button.</p>
  
  <p>In a normal <code>erb</code> file, I would write:</p>
  
  <pre><code>&lt;% if @article.id == current_user.id %&gt;
    &lt;button&gt;Delete&lt;/button&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I attempted to add <code>erb</code> extension to my template files, but I could not use embedded ruby syntax, nor the helper <code>current_user</code>.</p>
  
  <p>Another approach I took was adding <code>ng-show='owner'</code> to the button, and define <code>owner</code> function in the Angular controller to determine if the current user is the owner. But this did not work as I don't have access to <code>current_user</code>.</p>
  
  <p>Any suggestions? If there is a more Angular way to do this, I would also like to know.</p>