title: How would I access a value using Rails Associations
body: <p>So, I am trying to get my head around Associations in rails (I'm using 5.1.5).</p>
  
  <p>I have things working partially, but I am trying to get the <code>bank.title</code> which is for the associated bank account when I get back a list of payments.</p>
  
  <p>I can't seem to for the life of me work it out, how would I go about this or is there a better way to do this?</p>
  
  <pre><code>user
    has_many :payments
    has_many :bank_accounts
    has_many :banks, :through =&gt; :bank_accounts
  
  payments
    belongs_to :user
  
    # References: user_id and bank_account_id
  
  bank_account
    belongs_to :user
    belongs_to :bank
  
    # References: user_id and bank_id
  
  bank
    has_many :bank_accounts
  
    # Has a field title I would like to access
  </code></pre>