title: Rails 4 has_many through many
body: <p>I'm stuck on this:</p>
  
  <pre><code>class Worker &lt; ActiveRecord::Base
    has_many :skills
    has_many :jobs, through: :skills
  ..
  end
  
  class Skill &lt; ActiveRecord::Base
    belongs_to :worker
    has_many :jobs
  ..
  end
  
  class Job &lt; ActiveRecord::Base
    has_many :skills
    has_many :workers, through: :skills
  ..
  end
  </code></pre>
  
  <p>What I'm trying to do is set up a many to many between <code>Skill</code> and <code>Job</code> inside of the `has_many' through relationship?</p>
  
  <p>My question has three parts </p>
  
  <ol>
  <li>Is this possible - using the has_many jobs rather than belongs_to jobs.</li>
  <li>If it can be done and the code is wrong, how do I fix it?</li>
  <li>How can I create Worker, Skill and Job records? (looking for syntax)</li>
  </ol>
  
  <p>This is a picture (of sorts) of what I'm trying to do, hope it helps... :(</p>
  
  <p><img src="https://i.stack.imgur.com/XvxDI.png" alt="enter image description here"></p>