title: Unitialized Constant Xaaron::Group::GroupsRole
body: <p>So I am not understanding this error. I am trying to do the following:</p>
  
  <pre><code>module Xaaron
    class GroupsRoles &lt; ActiveRecord::Base
      belongs_to :groups
      belongs_to :roles
    end
  end
  
  module Xaaron
    class Group &lt; ActiveRecord::Base
      extend FriendlyId
      friendly_id :group_name, use: [:slugged, :finders, :history]
  
      has_many :groups_roles
      has_many :roles, :through =&gt; :groups_roles
  
      validates :group_name, presence: true, uniqueness: true
  
    end
  end
  
  module Xaaron
    class Role &lt; ActiveRecord::Base
      extend FriendlyId
      friendly_id :role_name, use: [:slugged, :finders, :history]
  
      has_many :groups_roles
      has_many :groups, :through =&gt; :groups_roles
  
      validates :role_name, presence: true
      validates_uniqueness_of :role_name
  
    end
  end
  </code></pre>
  
  <p>Its petter basic I am trying to create a join table using models and associations, by saying that roles has many groups and groups has many roles. this way I can assign many roles to many groups and vice versa.</p>
  
  <p>I should also be able to get all groups a role belongs to and all roles a group has.</p>
  
  <p>So the migration:</p>
  
  <pre><code>class GroupsAndRoles &lt; ActiveRecord::Migration
    def change
      create_table :xaaron_groups_roles do |t|
        t.belongs_to :groups
        t.belongs_to :roles
        t.integer :group_id
        t.integer :role_id
      end
    end
  end
  </code></pre>
  
  <p><em>One of the things I am a bit confused by, since this is an engine - should I be referencing the  <code>xaaron_groups</code> table (as thats what the table is called), or can I do <code>groups</code> and it knows what I am talking about?</em></p>
  
  <p>When I go into <code>rails c</code> and do, after creating a group.</p>
  
  <pre><code>g = Xaaron::Group.first
  g.roles #=&gt; I should get []
  </code></pre>
  
  <p>I get: <code>NameError: uninitialized constant Xaaron::Group::GroupsRole</code></p>
  
  <p>Why?</p>