This project is archived and is in readonly mode.
has_many: Dependent deleting does not work with STI
-
Georg Ledermann
- Tag changed from 2.3.8 has_many patch to 2.3.8, has_many, patch
-
Georg Ledermann
- Tag changed from 2.3.8, has_many, patch to 2-3-stable, 2.3.8, activerecord, associations, has_many, patch
-
Neeraj Singh
- Importance changed from to Low
If this is an issue in rails3 then can you attach a patch for rails3 too?
-
Georg Ledermann
The patch for Rails3 is just the same. I've attached it.
-
Neeraj Singh
When I apply the patch (patch-rails3.txt) I get following message
Patch does not have a valid e-mail address. -
Georg Ledermann
- Tag changed from 2-3-stable, 2.3.8, activerecord, associations, has_many, patch to 2-3-stable, 2.3.8, activerecord, associations, has_many, patch, rails3
Sorry, here comes a valid patch file for Rails 3. But there are still no tests for this very simple change. The patch just added a missing "base_class" usage.
-
Santiago Pastorino
- State changed from new to open
- Tag changed from 2-3-stable, 2.3.8, activerecord, associations, has_many, patch, rails3 to 2-3-stable, 238, activerecord, associations, has_many, patch, rails3
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
-
Mandaryn
- Tag changed from 2-3-stable, 238, activerecord, associations, has_many, patch, rails3 to activerecord, rails3
- State changed from stale to open
[state:open]
Just got stung by this on a rails 3.0.4.
The use case and error are exactly the same as in the original ticket.
I will try adding some testing to the patch
-
Mandaryn
ok my fault here, my problem is slightly (or even more than slightly) different.
the patch no longer applies to rails master
-
Mandaryn
after a bit of investigation I am convinced that this issue is fixed in current master [a0d7247d1509762283c61182ad82c2eed8d54757]
this case is also covered by this test:
test_clearing_an_exclusively_dependent_association_collection
in activerecord/test/cases/associations/has_many_associations_test.rb
