Skip to content

Instantly share code, notes, and snippets.

@acadavid
Created April 28, 2011 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save acadavid/945741 to your computer and use it in GitHub Desktop.
Save acadavid/945741 to your computer and use it in GitHub Desktop.
class User < ActiveRecord::Base
has_and_belongs_to_many :products_of_interest, :class_name => "Product"
has_and_belongs_to_many :brands_of_interest, :class_name => "Brand"
end
class Deal < ActiveRecord::Base
belongs_to :brand
belongs_to :product
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment