title: has_many of the same table through several others
body: <p>What am trying to do is:
  i have a User model and i have a Task model
  Task has 2 types of users Owners and Supervisors all of them are users !</p>
  
  <p>so what i have so far is:</p>
  
  <p>Task Model</p>
  
  <pre><code>class Task &lt; ActiveRecord::Base
    has_many :task_owners, dependent: :destroy
    has_many :task_supervisors, dependent: :destroy
    has_many :users, through: :task_owners
    has_many :users, through: :task_supervisors
  end
  </code></pre>
  
  <p>TaskSupervisor Model</p>
  
  <pre><code>class TaskSupervisor &lt; ActiveRecord::Base
    belongs_to :task
    belongs_to :user
  end
  </code></pre>
  
  <p>TaskOwner Model</p>
  
  <pre><code>class TaskOwner &lt; ActiveRecord::Base
    belongs_to :task
    belongs_to :user
  end
  </code></pre>
  
  <p>and finally the User Model</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_many :task_owners
    has_many :task_supervisors
    has_many :tasks, through: :task_owners
    has_many :tasks, through: :task_supervisors
  end
  </code></pre>
  
  <p>now as you can imagine ... my problem is when i get a task and retrieve the users i only get one of my associations ... what i need is a way to change the getters name or identify them some how basically to be able to say something like</p>
  
  <pre><code>task.owners
  task.supervisors
  </code></pre>