Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsibility tracking integration for console sessions #200

Closed
nickbender opened this issue Jul 26, 2021 · 2 comments
Closed

Responsibility tracking integration for console sessions #200

nickbender opened this issue Jul 26, 2021 · 2 comments

Comments

@nickbender
Copy link

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?

@palkan
Copy link
Owner

palkan commented Aug 20, 2021

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?)

@palkan
Copy link
Owner

palkan commented Aug 27, 2021

Closed in favor of #202

@palkan palkan closed this as completed Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants