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 tenant info to console boot? #41

Closed
JeremiahChurch opened this issue Apr 18, 2020 · 1 comment · Fixed by #47
Closed

Add tenant info to console boot? #41

JeremiahChurch opened this issue Apr 18, 2020 · 1 comment · Fixed by #47

Comments

@JeremiahChurch
Copy link
Contributor

Loving the new custom console!

What would you think about adding a short message on console boot so that folks that aren't familiar with the methods would be introduced to them?

I'm using the below as a quick way to show new devs to an apartment project the console commands without them needing to dig around or ask about them. And thought it might be something that could be incorporated in the gem.

# .pryrc
class WelcomeClass
  def self.tenant_info
    ActiveRecord::Base.logger.level = 1
    puts "Available Tenants: #{tenant_list}\n"
    print "Use `st 'tenant'` to switch tenants & `tenant_list` to see list\n"
    ActiveRecord::Base.logger.level = 1
  end
end

# run the code at `bin/rails console`
Pry.config.exec_string = WelcomeClass.tenant_info
Loading development environment (Rails 6.0.2.2)
Available Tenants: ["public", "ffb", "other"]
Use `st 'tenant'` to switch tenants & `tenant_list` to see list
[1] [development][public] pry(main)>

If you're open to the idea I'd be happy to put together a PR.

Thanks for your great work in picking up the maintenance on this gem!

@rpbaltazar
Copy link
Contributor

Hi @JeremiahChurch thank you for the feedback. I was very much sure that a lot of people would still be wanting this to move forward.

Sorry for the delays on the answers but i was on leave.

Please do open the PR. I think its quite useful

rpbaltazar added a commit that referenced this issue May 11, 2020
- updated custom console to include welcome message
rpbaltazar added a commit that referenced this issue May 14, 2020
- [Resolves #42]
- [Resolves #26]
- [Resolves #41]
- [Resolves #37]
- Updated github actions configuration to run on PRs as well
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

Successfully merging a pull request may close this issue.

2 participants