title: How do I include a Module into another Module (Refactor AASM code and custom states into Module)
body: <p>I'm trying to refactor a superfat model which has quite a few lines of ActsAsStateMachine code related to the states and transitions, and I was hoping to refactor this to a module call CallStates.  </p>
  
  <pre><code>#in lib/CallStates.rb
  module CallStates
      module ClassMethods
          aasm_column :status
          aasm_state :state1
          aasm_state :state2
          aasm_state :state3
      end
  
      def self.included(base)
          base.send(:include, AASM)
          base.extend(ClassMethods)
      end
  end
  </code></pre>
  
  <p>And then in the model</p>
  
  <pre><code>include CallStates
  </code></pre>
  
  <p>My question concerns how to include Module behavior into a Module such that a single Module can be included into the model.  I've tried class_eval do as well to no avail.  Thanks for any insightful thoughts you have on the matter.</p>