Skip to content

Adding custom attributes before save #241

Open
@amoghh

Description

@amoghh

I have a unique requirement. There is not many places i can ask this question because there is hardly any material on stackoverflow for this gem.
I have added history tracking to multiple models. What i want to do is to add my custom attributes to the history record before it is created. Is there any callback method which i can use to add attributes to the @history_tracker_attributes instance variable before it gets saved.
I do not want to add callbacks on the tracker class since i want to add different attributes based on the models for which history is being created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions