title: How to call another method from a self method with ruby?
body: <pre><code># app/models/product.rb
  class Product &lt; ApplicationRecord
    def self.method1(param1)
      # Here I want to call method2 with a parameter
      method2(param2)
    end
  
    def method2(param2)
      # Do something
    end
  end
  </code></pre>
  
  <p>I call method1 from controller. When I run the program. I got an error:</p>
  
  <pre><code>method_missing(at line method2(param2))
  .rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-5.0.0/lib/active_record/relation/batches.rb:59:in `block (2 levels) in find_each
  ...
  </code></pre>