title: Rails: Why is the "number_with_delimiter" method not recognized inside my model?
body: <p>I have a simple validation:</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
    # include ActionView::Helpers::NumberHelper
    ...
    validates_numericality_of :price, :less_than =&gt; 1000000, 
                              :message =&gt; "must be less than #{number_with_delimiter(1000000)}"                       
    ...
  end
  </code></pre>
  
  <p>On this code, I have received the following error:</p>
  
  <pre><code>undefined method `number_with_delimiter' for #&lt;Class:0x2665a58&gt;
  </code></pre>
  
  <p>I tried to add:</p>
  
  <pre><code>include ActionView::Helpers::NumberHelper
  </code></pre>
  
  <p>but it didn't help.</p>
  
  <p>What am I missing?</p>