title: Rails: Filter by comparing between two models
body: <p>I confused about matching between two models. I have researched on stackoverflow and google until 2 days but no way...
  There is more questions and answer about matching and filtering but it is about one way searching, listing. May be I couldn’t understand I’m not sure.
  For example:
  I have contents and users in my app.
  I shared contents and I don’t want to make visible, likeable for all users.
  Users should see who;</p>
  
  <ul>
  <li>Bigger than 18 years old and less than 70. </li>
  <li>must live at England and
  London city. (It can be changeable)</li>
  <li>they must have a drive license</li>
  <li>gender: man bla bla etc.</li>
  </ul>
  
  <p>My first idea was create profile for users and take information from them.
  Also create profile filter for <code>Content</code> model and fill the form like belov.</p>
  
  <p>But problem is at final step;
  “How i compare them for only users can see and like who has true attributes same as <code>Content</code> filter attributes.</p>
  
  <p>Models;</p>
  
  <p><code>User</code> and <code>Content</code></p>
  
  <p><code>Profile</code> belongs_to <code>user</code></p>
  
  <p><code>Contentfilter</code> belongs_to <code>Content</code></p>
  
  <p>Than;
  Show contens if current_user profile attributes same as Content filter.</p>
  
  <p>Do you have any suggestion?
  Thanks.</p>