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

Add console info about tenants and fast switches #14

Closed
rpbaltazar opened this issue Feb 19, 2020 · 2 comments
Closed

Add console info about tenants and fast switches #14

rpbaltazar opened this issue Feb 19, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@rpbaltazar
Copy link
Contributor

This is an enhancement proposal based on our use case. It is open for discussion and if we don't think its valuable for the users (or it bloats the project with unnecessary things) it can be released separately.

When we run the console in a project with apartment, generally we need to switch across tenants or execute some tasks within a specific tenant. We found it useful to have that info printed in the prompt. E.g

$ be rails c
$pry[public]> User.count
0
$pry[public]> st tenant_one
$[tenant_one]> User.count
10
$[tenant_one]> st
public
tenant_one
tenant_two
$[tenant_one]> st public
$pry[public]>

These are console commands that we have as part of our codebase, but could probably be adjusted to work out of the box.

@rpbaltazar rpbaltazar added the enhancement New feature or request label Feb 19, 2020
@joshukraine
Copy link

This sounds very useful!

@rpbaltazar rpbaltazar self-assigned this Feb 20, 2020
@rjayroach
Copy link

Since this is pry specific maybe it should be in a gem pry-apartment our code should probably also be refactored to allow hooks like after_switch so things like setting the tenant credential would be pluggable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants