Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Associations bug with :dependent => [:delete or :destroy]

#4127

It seems last commits refactoring associations introduced a small bug where associations with :dependent => :delete or :destroy were calling association.destroy only, and not association.delete. Here are the two commits:

http://github.com/rails/rails/commit/939291e8f2b68e11cde12f5f08886f...
http://github.com/rails/rails/commit/a424f199a9143e7ea451ba6f5e7dc5...

Attached is a patch using :send to call the right :destroy or :delete method.

Reported by Carlos Antonio da Silva · March 7th, 2010 @ 11:01 PM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Carlos Antonio da Silva
    Carlos Antonio da Silva

    Just noticed the tests were passing both before and after the patch, so here is another patch with new tests and a test fixed.

    March 8th, 2010 @ 12:58 AM

  2. José Valim
    José Valim
    • State changed from new to resolved
    • Milestone cleared.

    March 8th, 2010 @ 10:55 PM

  3. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM