views:

127

answers:

1

Is it true that HABTM relationship does not support :dependent option.

class Person < ActiveRecord::Base has_and_belongs_to_many :posts, :dependent => :destroy end

I am trying rails edge.

+1  A: 

Yep, It doesn't support it. See the docs. Generally habtm is meant only for very very simple cases and if you start needing more complex things you should switch to has_many :through.

Jakub Hampl