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
Just wondering if there's a 'standard' or accepted way for monitoring changes to associated models and displaying those changes in the parent's versions.
So for example:
class Account < ActiveRecord::Base
belongs_to :customer
has_paper_trail
end
class Customer < ActiveRecord::Base
has_one :account
has_paper_trail
end
So within an Account we use nested_attributes to modify the fields within the Customer model, and would like to track and display the changes to that Customer object within Account. At present we're just able to show the changes only to Account's fields, but within the context of our app a user would never look at a Customer object other than through its Account if that makes sense.
I've spent half an hour searching past issues and the documentation and can't see any reference to a scenario as above - not sure if I'm missing something simple or if this is just something Papertrail doesn't cater for? (That is, we'd have to expose Customer's versions separately/independently).
Any advice appreciated!
Thanks.
The text was updated successfully, but these errors were encountered:
There is also an open PR #348, but after examining it in detail I thought it was broken, but perhaps I was mistaken and if the current built in functionality doesn't fix your issue, perhaps that will.
I have now also released v4.0.0.beta2, which supports versioning of most relational associations, as well as some improvements to the has_one association version restoration, so feel free to give that a whirl for better associative reification support (see #439 for more details). Feel free to ask if you have any questions, I'm going to close this for now unless there's anything more you want to know.
Hi,
Just wondering if there's a 'standard' or accepted way for monitoring changes to associated models and displaying those changes in the parent's versions.
So for example:
So within an Account we use nested_attributes to modify the fields within the Customer model, and would like to track and display the changes to that Customer object within Account. At present we're just able to show the changes only to Account's fields, but within the context of our app a user would never look at a Customer object other than through its Account if that makes sense.
I've spent half an hour searching past issues and the documentation and can't see any reference to a scenario as above - not sure if I'm missing something simple or if this is just something Papertrail doesn't cater for? (That is, we'd have to expose Customer's versions separately/independently).
Any advice appreciated!
Thanks.
The text was updated successfully, but these errors were encountered: