You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The newest paper_trail makes it possible to restore relations (has_one and has_many),
but you need to supply the options ":has_many => true, :has_one => true" to the method
"reify" to make this possible:
Hi @nicolasfranck thanks for your feedback, really appreciated. Your idea sounds great, do you have a set up you'd be able to test this on? It would be awesome if you could help contribute this new feature to the module. Fancy submitting a pull request?
I'm working on it. But it's more complicating than you think.
When you only remove/add a relation, and change nothing
to the parent record, there is no new version of this parent record.
So no new version appears in history index, you can use as a reference.
It works if you update both parent record and relations.
Hey @nicolasfranck, it's tricky indeed. When I get a spare moment, I'll take a look into it too. I'm sure between us we can figure it out. I'll create a branch for it soon so we can test it all works.
Thanks for this great module!
The newest paper_trail makes it possible to restore relations (has_one and has_many),
but you need to supply the options ":has_many => true, :has_one => true" to the method
"reify" to make this possible:
https://github.com/airblade/paper_trail#associations
This to ensure backward compatibility, and not to confuse/enrage simple users.
Would it be interesting to add an extra button to restore also these associations?
For example "rollback (including assocations)"
The text was updated successfully, but these errors were encountered: