Module: ConsoleKit::ConsoleHelpers
- Defined in:
- lib/console_kit/console_helpers.rb
Overview
Helper methods available in the Rails console
Constant Summary collapse
- DETAIL_LABELS =
{ 'Partner' => :partner_code, 'Shard' => :shard, 'Mongo DB' => :mongo_db, 'Redis DB' => :redis_db, 'ES Prefix' => :elasticsearch_prefix, 'Environment' => :environment }.freeze
Instance Method Summary collapse
Instance Method Details
#dashboard ⇒ Object
19 |
# File 'lib/console_kit/console_helpers.rb', line 19 def dashboard = ConsoleKit::Connections::Dashboard.display |
#switch_tenant ⇒ Object
6 |
# File 'lib/console_kit/console_helpers.rb', line 6 def switch_tenant = ConsoleKit.reset_current_tenant |
#tenant_info ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/console_kit/console_helpers.rb', line 8 def tenant_info tenant = ConsoleKit::Setup.current_tenant unless tenant ConsoleKit::Output.print_warning('No tenant is currently configured.') return end constants = ConsoleKit.configuration.tenants[tenant]&.[](:constants) || {} print_tenant_details(tenant, constants) end |
#tenants ⇒ Object
21 22 23 24 25 |
# File 'lib/console_kit/console_helpers.rb', line 21 def tenants names = ConsoleKit.configuration.tenants&.keys || [] ConsoleKit::Output.print_list(names, header: 'Available Tenants') names end |