title: Find all records NOT in a many-to-many association
body: <p>In Rails 3 with ActiveRecord, I have 2 models (Users and Tasks). These models are linked together with a has_many :through association on another model, Assignments. How can I find all Tasks that are NOT associated to a particular user?</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_many :assignments
    has_many :tasks, :through =&gt; :assignments
  end
  
  class Tasks &lt; ActiveRecord::Base
    has_many :assignments
    has_many :users, :through =&gt; :assignments
  end
  
  class Assignments &lt; ActiveRecord::Base
    belongs_to :users
    belongs_to :tasks
  end
  </code></pre>