title: find attribute in a rails model with another has_many relationship
body: <p>I really don't know how to bring up the question, so I going to explain it.</p>
  
  <p>I have the next models: Movie, Genre and Theater. The movies and theaters have a many-to-many relationship. Movies and genres have the same relationship.</p>
  
  <p>In rails:</p>
  
  <ul>
  <li>theaters <code>has_many</code> movies</li>
  <li>movies <code>belongs_to</code> theaters</li>
  <li>movies <code>has_many</code> genres</li>
  <li>genres <code>belongs_to</code> movies</li>
  </ul>
  
  <p><strong>My problem:</strong> </p>
  
  <p>with <code>theater = Theater.all.first</code> (for example) I can get the first theater and then do <code>theater.movies</code> and get all the movies that the theater has. But how I can get only the movies with a specific genre? Must be some nice way to do it, but I din't find any.</p>