Project

General

Profile

Actions

Patch #12659

closed

Broken dirty_tracking inside a after_save callback for the Issue model due to reload in Mailer

Added by Vladimir Kiselev almost 12 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

.reload not just gives us current record from database, but also resets *_changed? .changes and etc. in all later methods from callback chain for the reloaded item as a side-effect.
Since there are many plugins which rely on callbacks and sometimes dirty-tracking, this is a problem.
For now, there is a workaround - we can save .changed data in before_save callback. But i think it is better to just isolate the issue record in mailer.


Files

patch.diff (2.08 KB) patch.diff Vladimir Kiselev, 2012-12-20 16:44
Actions

Also available in: Atom PDF