When I go to a paper_trail
history page in rails_admin, I see User objects in the User column (#<User:0x007f59a9...
). Is there a way to configure this to use one of the User attributes? I thought I could use object_label_method
but I don't seem to be having any luck.
Update:
I thought this was purely a display issue but paper_trail
is actually storing Strings like #<User:0x007f59a9...
in the whodunnit
column of the versions table rather than IDs. I have overridden user_for_paper_trail
in ApplicationController
and while this successfully logs versions with User IDs in my frontend app, it does not in rails_admin. According to this thread, rails_admin should see my custom method because "RailsAdmin::ApplicationController inherits from your ::ApplicationController". Any thoughts on why this is happening and how I can get paper_trail
to store User IDs?