Polymorphic responsible? #191
victormatheusdev
started this conversation in
Ideas
Replies: 1 comment
-
I think, that's the right approach. Since we provide an ability to store custom metadata, it's up to the end user to design its structure. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I am migrating from Audit to Logidze and I have a question. Is there a way to, instead of just storing the ID, also store the Type of the person responsible for the change in a Logidze :: History?
I thought of solving this in the following ways:
Logidze.with_meta({responsible_id: User.first.id, responsible_type: "User"})
or
Logidze.with_meta({"_r": {responsible_id: User.first.id, responsible_type: "User"}})
But I would like to know if anyone has had this problem and if there is a better solution (even with monkey paths)
Beta Was this translation helpful? Give feedback.
All reactions