title: Rails Active record joins query
body: <pre><code>class Inquiry &lt; ApplicationRecord
    belongs_to :user , dependent: :destroy
    belongs_to :booking , dependent: :destroy
  
  
  end
  
  class Booking &lt; ApplicationRecord
    belongs_to :user
    belongs_to :property
    has_many :inquiries
    
  
  end
  
  class Property &lt; ApplicationRecord
    
    belongs_to :user
    has_many :bookings,  dependent: :destroy
  end
  </code></pre>
  <p>I have these models where a user can create a property and after that he can do a booking of that property, and after that he can create an inquiry.
  On the inquiry index page I want to display a property name through the booking table in which the id property is stored.
  Can anyone help me with that?</p>