Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Dirty tracking not working in after_recover callback #118

Open
russellbrown opened this issue Jul 1, 2013 · 1 comment
Open

Dirty tracking not working in after_recover callback #118

russellbrown opened this issue Jul 1, 2013 · 1 comment

Comments

@russellbrown
Copy link

Dirty tracking doesn't seem to work properly in the after_recover callback:

before_recover :do_something_before
after_recover :do_something_after

def do_something_before
  deleted_at # => 2013-07-01 10:58:49
end

def do_something_after
  deleted_at # => nil
  deleted_at_changed? # => false, should be true
  deleted_at_was? # => nil, should be 2013-07-01 10:58:49
end

Is this expected behaviour? It feels like I should be able to access the old deleted_at timestamp in the after_recover callback because it is still part of the record's lifecycle.

@zzak
Copy link
Contributor

zzak commented May 12, 2014

Could you help write a failing test?

cc @andremedeiros

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants