title: Mongoid Relationship within an ActiveSupport::Concern Module
body: <p>I'm trying to create a module that includes a polymorphic relationship with Mongoid. Simplified example:</p>
  
  <pre><code>module Scalable
    extend ActiveSupport::Concern
  
    included do
      references_many :scales, :as =&gt; :scalable
  
      before_save :add_scale
    end
  
    module InstanceMethods
      def add_scale
        self.scales.create
      end
    end
  end
  
  class Scale
    include Mongoid::Document
  
    referenced_in :scalable, :index =&gt; true
  end
  
  class ScalableModel
    include Mongoid::Document
    include Scalable
  end
  </code></pre>
  
  <p>However, when I try to run something like <code>ScalableModel.create</code>, I get the following error:</p>
  
  <pre><code>NoMethodError Exception: undefined method `relations' for Scalable:Module
  </code></pre>
  
  <p>Is this not possible, or am I doing something wrong?</p>