Closed vsolari closed 2 years ago
This is not a bug in PublicActivity but a tradeoff of using activerecord-import which is documented here: https://github.com/zdennis/activerecord-import#callbacks. It’s the same with counter caches, also documented a bit further up: https://github.com/zdennis/activerecord-import#counter-cache
As far as I can tell, you have 2 options:
#import
to trigger the callback (for each record!) https://github.com/public-activity/public_activity/blob/73978cf5495c5ccc781513a818a5bcd5f8ecca9b/lib/public_activity/actions/creation.rb#L9import
call. The mentioned links provide some strategies and possible workarounds.
Currently I use the 'activerecord-import' gem in some functionalities, when the insertion is done through "import", the "public_activity" does not insert the activity. Is there a way to record the movement of large volumes of data?