Closed nickbender closed 3 years ago
Is there another sane way to add default or fallback responsibility_id tracking for all actions that might happen in a rails console session?
I think, we can use config.console
block here (https://guides.rubyonrails.org/configuring.html#rails-general-configuration) like this:
console do
Logidze.with_responsible!(current_user.id)
end
The only problem is that we don't have a block-less version yet 🙂. Would you like to work on this feature?)
Closed in favor of #202
Feature Request
At current, responsibility_id gets assigned by wrapping any command with a block, which works great in situations like controllers or operations that can be dealt with in lifecycles, but this makes wrapping an entire console session in production a bit more cumbersome.
While I'm open to suggestions on how best to wrap console with the
Logidze.with_responsible
block, that would require a bit more hacking than feels appropraite.Is there another sane way to add default or fallback responsibility_id tracking for all actions that might happen in a rails console session?