Q:

Rails 3 has_many :through accessing attributes

I am working with a has_many through for the first time, and despite a lot of reading here and in the guide  I am not understanding the correct way to access attributes on the through table.  My tables are the same as this example from another post. 
    class Product < ActiveRecord::Base
       has_many :collaborators
       has_many :users, :through => :collaborators
    end

    class User < ActiveRecord::Base
       has_many :collaborators
       has_many :products, :through => :collaborators
   end

   class Collaborator < ActiveRecord::Base
      belongs_to :product
      belongs_to :user
   end

Assuming that the collaborators table has additional attributes, say hours_spent, what is the correct way to find the hours_spent from the collaborator table for a particular user and product?  
When I have found my users via the product, and am iterating over them as in 
    @product.users.each do |user| 

This seems to work 
    user.collaborator[0].hours_spent

I get the correct value, but since there should only be one  collaborator record for each User/Product pair, the index is throwing me off, making me think I’m doing something wrong.  
Thank you for reading!  
EDIT
Perhaps I am not getting the has_many through concept.  Maybe a MySQL example would help. 
What I was thinking is that if I did 
    SELECT * FROM collaborators where user_id = 1;

I would expect a set (zero or more) as the result.  Similarly 
    SELECT * FROM collaborators where product_id = 1;

would also give me a set, but 
    SELECT * FROM collaborators where user_id = 1 and product_id = 1;

would give at most 1 row.  
If I am understanding properly, all 3 queries return a set.  So I guess I need some kind of uniqueness constraint, but that would have to be a compound key of sorts, on both of the belongs to keys.  Is that even possible?  Is there a structure that better models this?  
Thanks so much for the quick and helpful responses!  

A:

After implementing this, what I found was that I think I had the correct relationships setup, I had to use the has_many :though as users could have many products, and it needed to be :through because there are additional attributes on the collaborator table.  The sticking point was how to get there to only be a single Collaborator record for each user/product pair, and then how do I guarantee I got it.  And to this point the answer I've found is it has to be done in code.  
To make sure there is only a single record for each pair, I used 
class Collaborator < ActiveRecord::Base
  validates :product_id, :presence => true,  :uniqueness => {:scope => [:user_id], :message => "This is a duplicate join"}

And then to make doubly sure I'm finding the right record, I have a scope
 scope :collaboration_instance, lambda {|p_id, u_id| where("collaborations.product_id = ? &&  collaborations.user_id = ?",  p_id, u_id)}

If someone has a more elegant solution, or just wants to improve this one, please post and I will change yours to the selected answer. 