title: rails 5 HABTM associations
body: <p>How can I get all Skills that does not already exist in the UserSkill table for current_user?</p>
  
  <pre><code>class User &lt; ApplicationRecord
      has_many :user_skills
      has_many :skills, through: :user_skills
  end
  
  class Skill &lt; ApplicationRecord
      has_many :user_skills
      has_many :users, through: :user_skills
     end
  
  class UserSkill &lt; ApplicationRecord
      belongs_to :user
      belongs_to :skill
  end
  </code></pre>
  
  <p>I have tried this:
  <br></p>
  
  <pre><code>@available_user_skills = Skill.includes(:user_skills).where.not( :user_skills =&gt; { :user_id =&gt; current_user } )
  </code></pre>
  
  <p>Which just loads all Skills that exist in the Skills table.</p>