Tell me if this is correct:

I have a Shop, a Bar and OtherShop.
Everyone have a Category.
So I can create a polymorphic association:

Shop has_many :categories, :as => categorization
Bar has_many :categories, :as => categorization
OtherShop has_many :categories, :as => categorization


Category belongs_to :categorization, :polymorphic => true


Is it the same if I do:

Shop has_many :categories
Bar has_many :categories
OtherShop has_many :categories

Category
belongs_to :shop
belongs_to :bar
belongs_to :other_shop

What's the difference using polymorphic?.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to