title: Is it ok to call ActiveRecord Methods in the view Rails
body: <p>Using Rails 4</p>
  
  <p>I am wondering (and having a hard time finding an answer) if it is OK to call an ActiveRecord method directly from the view, such as:</p>
  
  <pre><code>&lt;%= Article.where(approved: true).count %&gt;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&lt;%= Article.where("short_answer is NOT NULL and short_answer != ''").count %&gt;
  </code></pre>
  
  <p>I realize the normal practice would be to store these in an instance variable inside of the controller, but since I am using a partial, I cannot do that.</p>
  
  <p>Is doing this ok? Can it hurt? Is there a better way to go about this (such as a helper method)? Thank you!</p>