I've noticed that if I use associations with has_many_and_belongs_to
and i call a destroy method on an object of the association, the
record in the join table is automatically deleted.
If I use has_many :though, for example:

Category
has_many :categorizations
has_many :products, :through => :categorizations

I have to put explicity

has_many :categorization, :dependent => :destroy

otherwise the association isn't deleted.
Why?

-- 
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