Topic: acts_as_rateable on multiple instances

Hi,

I'm trying to implement acts_as_rateable on my site per the instructions on http://www.naffis.com/blog/articles/200 … ng-system. However, I'd like to enable users to rate different instances of the rateable model. How would I access the rating of a particular instance?

My app contains Shops and Drinks, which are associated via ShopDrinks:

class Drink < ActiveRecord::Base
  has_and_belongs_to_many :shops
  has_many :shop_drinks, :dependent => :destroy
  has_many :shops, :through => :shop_drinks
end

class Shop < ActiveRecord::Base 
  ...
  has_and_belongs_to_many :drinks
  has_many :shop_drinks, :dependent => :destroy
  has_and_belongs_to_many :features
  ...
end


I have also set up a join model to link Shops and Drinks together, where I've decided to put acts_as_rateable:
class ShopDrink < ActiveRecord::Base
  set_table_name 'drinks_shops'
  set_primary_key :not_id
  belongs_to :shops
  belongs_to :drinks
  acts_as_rateable
end

Any help would be really appreciated. Thanks

Avishai