-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I had some legacy code that works find using old state_machine-audit_trail gem.
After upgrading I noticed that when I create new objects, those initial transitions are not properly set.
On old gem I see that only on @post.save hook, audit trail generate context messages.
But now I see that context messages are generated on Post.new.
I can't pass all params to Post.new post_params since I need some calculations.
Only initial params are used to create audit trail context messages.
Here is example app https://github.com/duleorlovic/state_machines-audit_trail
You can notice that hard coded name is not used in audit trail even it is before .save.
I'm not sure if this is related to active record state-machines/state_machines-activerecord#38 or to audit_trail... anyway we need to update migration document
https://github.com/state-machines/state_machines-audit_trail/wiki/Converting-from-former-state_machine-audit_trail-to-state_machines-audit_trail