title: "Uninitialized constant" error when including a module
body: <p>I am trying to reference an association extension but it errors with:</p>
  
  <pre><code>NameError (uninitialized constant User::ListerExtension):
    app/models/user.rb:2:in `&lt;class:User&gt;'
  </code></pre>
  
  <p>Here is my implementation:</p>
  
  <h3>app/models/user.rb</h3>
  
  <pre><code>class User &lt; ActiveRecord::Base
    include ListerExtension
  
    has_and_belongs_to_many :roles, :uniq =&gt; true, :extend =&gt; Lister
  </code></pre>
  
  <h3>lib/lister.rb</h3>
  
  <pre><code>module ListerExtension
    def lister
      self.map(&amp;:to_s).join(', ')
    end
  end
  </code></pre>
  
  <p>I am using Rails v3.1.3.</p>