title: Calling a helper from a class and instance method in a Rails model
body: <p>I need to call a helper method within a model, from both a class and an instance method, e.g. <code>Model.method(data)</code> and <code>model_instance.method</code>.  However, the class method always returns "NoMethodError: undefined method 'helper_method' for #&lt;Class ...&gt;"</p>
  
  <p><strong>model.rb:</strong></p>
  
  <pre><code>class Model &lt; ActiveRecord::Base
    include ModelHelper
  
    def method
      helper_method(self.data)
    end
  
    def self.method(data)
      self.helper_method(data)
    end
  end
  </code></pre>
  
  <p><strong>model_helper.rb:</strong></p>
  
  <pre><code>module ModelHelper
    def helper_method(data)
      # logic here
    end
  end
  </code></pre>
  
  <p>I even tried adding <code>def self.helper_method(data)</code> in the helper to no avail.</p>
  
  <p>After quite a bit of seraching, I wasn't able to find anything on how to achieve this, or at least anything that worked.</p>