title: Rails: TypeError: wrong argument type Class (expected Module)
body: <p>Inside app/models/abc/xyz.rb</p>
  
  <pre><code>module Abc::Xyz
    extend ActiveSupport::Concern
  end
  </code></pre>
  
  <p>Inside app/models/abc.rb</p>
  
  <pre><code>class Abc &lt; ActiveRecord::Base
    include Abc::Xyz 
  end
  </code></pre>
  
  <p>When I try to fetch data from Abc.where(id: id) sometimes it works and sometimes it returns this error(TypeError: wrong argument type Class (expected Module)).</p>
  
  <pre><code>TypeError: wrong argument type Class (expected Module)
        app/models/abc.rb:2:in `include'
        app/models/abc.rb:2:in `&lt;class:Abc&gt;'
        app/models/abc.rb:1:in `&lt;top (required)&gt;'
        activesupport (3.2.17) lib/active_support/dependencies.rb:469:in `load'
        activesupport (3.2.17) lib/active_support/dependencies.rb:469:in `block in load_file'
        activesupport (3.2.17) lib/active_support/dependencies.rb:639:in `new_constants_in'
        activesupport (3.2.17) lib/active_support/dependencies.rb:468:in `load_file'
        activesupport (3.2.17) lib/active_support/dependencies.rb:353:in `require_or_load'
        activesupport (3.2.17) lib/active_support/dependencies.rb:502:in `load_missing_constant'
        activesupport (3.2.17) lib/active_support/dependencies.rb:192:in `block in const_missing'
        activesupport (3.2.17) lib/active_support/dependencies.rb:190:in `each'
        activesupport (3.2.17) lib/active_support/dependencies.rb:190:in `const_missing'
        activesupport (3.2.17) lib/active_support/inflector/methods.rb:230:in `block in constantize'
        activesupport (3.2.17) lib/active_support/inflector/methods.rb:229:in `each'
        activesupport (3.2.17) lib/active_support/inflector/methods.rb:229:in `constantize'
        activesupport (3.2.17) lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
  </code></pre>