title: Ruby (rails) - including module in model
body: <p>I'm missing something stupid.  Help?</p>
  
  <p>lib/api.rb</p>
  
  <pre><code>require 'httparty'
  
  module API
    def self.call_api(query)
      base_url = "http://myapi.com"
      return HTTParty.get("#{base_url}/#{query}.json")
    end
  end
  </code></pre>
  
  <p>models/job.rb</p>
  
  <pre><code>require 'api'
  
  class Job
    include API
  
    def self.all(page=1)
      self.call_api "jobs?page=#{page}"
    end
  
  end
  </code></pre>
  
  <blockquote>
    <p>Job::all
    NoMethodError: undefined method `call_api' for Job:Class</p>
  </blockquote>
  
  <p>If I move my "call_api" directly into the Job class, it works. What am I missing?</p>