aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix #3672 again (dependent: delete_all perf)Jon Leighton2011-12-141-1/+1
|
* Destroy association habtm record before destroying the record itself. Fixes ↵Tomas D'Stefano2011-07-081-12/+10
| | | | issue #402.
* Removes the restriction on primary key when joining in a habtm && test that ↵Mohammad El-Abid2011-05-261-4/+0
| | | | it was properly removed
* Make clearing of HABTM join table contents happen in an after_destory callback.Murray Steele2011-03-231-12/+12
| | | | The old method of redefining destroy meant that clearing the HABTM join table would happen as long as the call to destroy succeeded. Which meant if there was a before_destroy that stopped the instance being destroyed using normal means (returning false, raising ActiveRecord::Rollback) rather than exceptional means the join table would be cleared even though the instance wasn't destroyed. Doing it in an after_destroy hook avoids this and has the advantage of happening inside the DB transaction too.
* Use proper objects to do the work to build the associations (adding methods, ↵Jon Leighton2011-02-211-0/+63
callbacks etc) rather than calling a whole bunch of methods with rather long names.