title: Has and belongs to many - check additional field
body: <p>I have an User and Employer models. An User can have multiple Employers and vise versa and there is also a flag indicating if their relationship is active:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_and_belongs_to_many :employers
  
  end
  
  class Employer &lt; ActiveRecord::Base
    has_and_belongs_to_many :users
  end
  </code></pre>
  
  <p>and a migration:</p>
  
  <pre><code>class CreateUserEmployers &lt; ActiveRecord::Migration
    def change
      create_table :users_companies do |t|
        t.integer :user_id
        t.integer :employer_id
        t.boolean :is_active
      end
    end
  end
  </code></pre>
  
  <p>If I have an User and one of their employers</p>
  
  <pre><code>test1 = User.find(1).employers.first
  </code></pre>
  
  <p>how do I check if an <code>User's</code> relationship with that <code>Employer</code> is active (the field <code>is_active</code> in <code>users_employers</code> table)?</p>