I have a member class that has many application_partials through subdivisions. My models look like the following:
class Member < Company ... has_many :subdivisions, :dependent => :destroy has_many :application_partials, :through => :subdivisions, :order => "subdivisions.position" .... end
class Subdivision < ActiveRecord::Base belongs_to :member belongs_to :application_partial, :dependent => :destroy acts_as_list :scope => :member_id end
class ApplicationPartial < ActiveRecord::Base has_many :subdivisions has_many :members, :through => :subdivisions end
When I destroy a member, all of the application partials associated with the member should be destroyed as well. I have tried various methods, but can not find a way to accomplish this.
Thanks for your help!