title: has_many relationship rails 3
body: <p>Hi I have three tables like the following:</p>
  
  <pre><code>    class Workitem &lt; ActiveRecord::Base
        has_many :effort
        attr_protected
      end
  
      class Effort &lt; ActiveRecord::Base
        attr_protected
        belongs_to :workitem
        belongs_to :person
      end
  
      class Person &lt; ActiveRecord::Base
        attr_accessible :given_name, :mgrid, :surname, :id
        has_many :effort
      end
  </code></pre>
  
  <p>The idea is to keep track of how many days a person has spent on a particular work item through efforts table. Could somebody verify if my relationships are correct? But this doesn't seem to work. Am I missing something here?
  Also, I can't understand the <code>has_many :through</code> kind of associations. Can somebody please give me an idea if that is what I'm supposed to use in this case?</p>