gocardless / statesman

A statesmanlike state machine library.
https://gocardless.com/blog/statesman/
MIT License
1.78k stars 163 forks source link

[MERGED] ActiveModel.reload has to clear the internal cache [MERGED] #507

Closed zerc closed 1 year ago

zerc commented 1 year ago

In https://github.com/gocardless/statesman/pull/417 the state.reset method was added and suggested to be used together with active_record.reload.

In this PR, I make sure that we apply this logic automatically if Statesman::Adapters::ActiveRecordQueries included to the model definition so the users don't have to do this themself.

zerc commented 1 year ago

PR is merged but for some reason it's not marked as such on Github 😭

Screenshot 2023-04-21 at 15 46 23