title: Ruby on Rails Active Record inner join not working
body: <p>I have 2 models: Engagement, user. Engagement basically refers to the items booked by the user. each engagement is for a specific user. user in engagement has a foreign key. I want to join engagement with user so that i can see the details of the user. </p>
  
  <p>Here are my models</p>
  
  <pre><code>class Engagement &lt; ActiveRecord::Base
    belongs_to :food_item  
    belongs_to :user
  end
  class User &lt; ActiveRecord::Base
      has_many :engagements
      has_many :food_item, through: :engagements
  end
  </code></pre>
  
  <p>I am running below query:</p>
  
  <pre><code>Engagement.joins("INNER JOIN users ON users.id = engagements.user_id")
  </code></pre>
  
  <p>It is not joining both the tables.</p>
  
  <p>Any help will be appreciated</p>