-
Notifications
You must be signed in to change notification settings - Fork 158
Custom prompt
Rui edited this page Dec 16, 2020
·
1 revision
ros-apartment
console configures two helper methods:
-
tenant_list
- list available tenants while using the console -
st(tenant_name:String)
- Switches the context to the tenant name passed, if it exists.
ros-apartment
also has a custom prompt that gives a bit more information about
the context in which you're running. It shows the environment as well as the tenant
that is currently switched to. In order for you to enable this, you need to require
the custom console in your application.
In application.rb
add require 'apartment/custom_console'
.
Please note that we rely on pry-rails
to edit the prompt, thus your project needs
to install it as well. In order to do so, you need to add gem 'pry-rails'
to your
project's gemfile.