title: Is there a Rails way or a gem to get related entries from HABTM to the same object?
body: <p>Well, I have a table with images, each image is tagged with a HABTM relation through a join table.</p>
  
  <p>What I want to do is show related images in the page the image is being shown, by matching images with the same tags.</p>
  
  <p>Can this be done efficiently with the current join table or I should generate joins between images in another table each time a new image is created?</p>