has_many through: Why do I always need 2 associations for each of the 3 models?
===

I wonder, why I always have to also specify the has_many :assignments association in both of the models in question? Is this DRY? Are there cases when I do not need to specify them, or when they differ? Thank you for explanation.

    class Programmer < ActiveRecord::Base
      has_many :projects, :through => :assignments
      has_many :assignments # Why that?
    end

    class Project < ActiveRecord::Base
      has_many :programmers, :through => :assignments
      has_many :assignments # Why that?
    end

    class Assignment < ActiveRecord::Base
      belongs_to :project
      belongs_to :programmer
    end