title: Multiple many-to-many association between two models
body: <p>I've created a many to many relation ship like the following structure. </p>
  
  <pre><code>Class User
   has_many :companies, :through =&gt; company_admins
   has_many :company_admins
  end
  
  Class Company
   has_many :company_admins
   has_many :users,  :through =&gt; company_admins
  end
  
  Class CompanyAdmin
   belongs_to :company
   belongs_to :user
  end
  </code></pre>
  
  <p>Here, <code>User</code> can be assigned as admin on many <code>Company</code>.</p>
  
  <p>Now I've to create another many-to-many relationship with <code>User</code> and <code>Company</code>, where <code>User</code> can follow many <code>company</code>. How can I do that?</p>
  
  <p>I've added </p>
  
  <pre><code>Class User
   has_many :companies, :through =&gt; company_admins
   has_many :companies, :through =&gt; followers
   has_many :company_admins
   has_many :followers
  end
  
  Class Company
   has_many :company_admins
   has_many :followers
   has_many :users,  :through =&gt; company_admins
   has_many :users,  :through =&gt; followers
  end
  
  Class Follower
   belongs_to :company
   belongs_to :user
  end
  </code></pre>
  
  <p>Now, If I search for users  which are admin to any company using <code>@company.users</code> it searches in the <code>Follower</code> table. 
  Can anyone help me with the association? </p>