You should definitely add a new field to your associations join table: this is the correct way to store this relationship. There's various things you could do after that.
You could add some new has_many associations:
class Product < ActiveRecord::Base
has_many :associations
has_many :users, :through => :associations
has_many :weak_associated_users, :class_name => "User", :through => :associations, :source => :user, :conditions => ["associations.strength = ?", "weak"]
has_many :medium_associated_users, :class_name => "User", :through => :associations, :source => :user, :conditions => ["associations.strength = ?", "medium"]
has_many :strong_associated_users, :class_name => "User", :through => :associations, :source => :user, :conditions => ["associations.strength = ?", "strong"]
end
class User < ActiveRecord::Base
has_many :associations
has_many :products, :through => :associations
has_many :weak_associated_products, :class_name => "Product", :through => :associations, :source => :product, :conditions => ["associations.strength = ?", "weak"]
has_many :medium_associated_products, :class_name => "Product", :through => :associations, :source => :product, :conditions => ["associations.strength = ?", "medium"]
has_many :strong_associated_products, :class_name => "Product", :through => :associations, :source => :product, :conditions => ["associations.strength = ?", "strong"]
end
#fields: user_id, product_id, strength
class Association < ActiveRecord::Base
belongs_to :user
belongs_to :product
end
And then do something like (on the page)
<h2>Strongly association users</h2>
<% @product.strong_associated_users.each do |user| %>
...show user info here
<% end %>
Or, you could not bother with the new has_many associations, and just split the association records up on the page:
<% grouped = @product.associations.find(:all, :include => [:user]).group_by(&:strength) %>
<% ["weak", "medium", "strong"].each do |strength| %>
<% if associations = grouped[strength] %>
<h2><%= strength %> associations</h2>#
<% associations.each do |association| %>
<% user = association.user %>
...show user info here
<% end %>
<% end %>
<% end %>