title: how to use through in rails model with separate foreign keys
body: <p>I have a rails app with the models below. I would like to be able to refer to profiles directly from tasks. As I see I should use :through somehow, but I can't figure it out. At the moment let's say if I wanna get the first_name in task model I gotta use task.executor.profile.first_name. Instead of that I would like to use task.executor_profile.first_name. </p>
  
  <p>I need it for ransack where you can refer to the associations with include. If there is an easier solution without having to do the :through association, pls let me know.</p>
  
  <p>UPDATE:</p>
  
  <p>Based on @rlarcombe's I tried delegate but unfortunately Ransack doesn't seem to be supporting that solution, but it's working nicely with rails. Can sby tell me how could I use the :through association in this case?</p>
  
  <p>user.rb</p>
  
  <pre><code>has_many :assigned_tasks, class_name: "Task", foreign_key: "assigner_id", dependent: :destroy
  has_many :executed_tasks, class_name: "Task", foreign_key: "executor_id", dependent: :destroy
  has_one :profile, dependent: :destroy
  </code></pre>
  
  <p>profile.rb</p>
  
  <pre><code>belongs_to :user
  </code></pre>
  
  <p>task.rb</p>
  
  <pre><code>belongs_to :assigner, class_name: "User"
  belongs_to :executor, class_name: "User"
  </code></pre>