berk / tr8n

This repository has moved to:
https://github.com/tr8n/tr8n
MIT License
280 stars 37 forks source link

Deleting TranslationVote record deletes Translation record #24

Open euge opened 13 years ago

euge commented 13 years ago

Heya, Seems that deleting a TranslationVote record deletes it's associated Translation record via :dependent => :destroy. This seems unexpected, is it intentional?

Thanks!

Euge

berk commented 13 years ago

If that's the case, it's a bug. Translation vote belongs to a translation and deleting translation should delete all votes for that translation, not the other way around.

Michael

On Apr 8, 2011, at 2:04 PM, eugereply@reply.github.com wrote:

Heya, Seems that deleting a TranslationVote record deletes it's associated Translation record via :dependent => :destroy. This seems unexpected, is it intentional?

Thanks!

Euge

Reply to this email directly or view it on GitHub: https://github.com/berk/tr8n/issues/24

stevecrozz commented 13 years ago

Cool, I was going to update the model and add a pull request, but it really is just removing the :dependent => destroy from the translation_vote model so I figured you probably don't need a whole pull request for that.