title: How can I set up conditional associations in Rails?
body: <p>So I have two associated models Users and Magazines. They are associated by a has_many :through relationship via Subscriptions. So this is what it looks like:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_many :subscriptions
    has_many :magazines, :through =&gt; :subscriptions
  end
  
  class Subscription &lt; ActiveRecord::Base
    belongs_to :user
    belongs_to :magazine
  end
  
  class Magazine &lt; ActiveRecord::Base
    has_many :subscriptions
    has_many :users, :through =&gt; :subscriptions
  end    
  </code></pre>
  
  <p>Users have a boolean attribute called <code>paid</code>. I only want users where <code>paid == true</code> to be able to subscribe to any magazines. How can I set up a conditional association like this? Thanks in advance for the help!</p>