Displaying 1 result from an estimated 1 matches for "destroy_without_habtm_shim_for_team".
Did you mean:
destroy_without_habtm_shim_for_teams
2005 Dec 31
6
habtm recursion via destroy_without_callbacks
...E TABLE people_teams (person_id INT, team_id INT);
The person model has:
has_and_belongs_to_many :teams
And the team model has:
has_and_belongs_to_many :people
The trouble comes when trying to destroy something, I end up with a
recursive stack sequence that looks something like:
(eval):7:in `destroy_without_habtm_shim_for_teams''
(eval):9:in `destroy_without_habtm_shim_for_teams''
(eval):9:in `destroy_without_callbacks''
...
This appears to be due to something in associations.rb where the
association array is cleared as part of destroying the record. What
appears to be happening is that when pe...