Add dirty tracking of paranoia attributes#375
Add dirty tracking of paranoia attributes#375pfeiffer wants to merge 2 commits intorubysherpas:corefrom
Conversation
|
Will fix and squash commits to support Rails 5.0.0. |
|
This is awesome. Thanks @pfeiffer ! |
|
@pfeiffer whats the status on this? |
|
Sorry for not updating on this before now. I didn't manage to get the dirty tracking working on Rails 5 since there has been some changes to the dirty tracking internals. The project I need this for isn't on Rails 5 yet, so it's not relevant for me. Feel free to dig in and update make a new PR with Rails 5 support! :) |
|
@BenMorganIO It seems |
|
@dgmora I'd love to be able to look at it and maybe we can figure things out from there. |
|
@BenMorganIO Did you see #416 ? 🙂 |
|
👀 is this still relevant to someone ? |
This PR adds ActiveModel dirty tracking to the paranoid attributes.
See: #373
This is extremely useful if you have after_commit callbacks that should only run if certain attributes have changed, eg. if
deleted_atis changed:PR also supports custom attributes (eg.
activeanddestroyed_at). In that case dirty tracking is enabled for all attributes.