From 98ec0f75056f03b31af525132d3611509ba1c457 Mon Sep 17 00:00:00 2001 From: Rui Baltazar Date: Sun, 22 Mar 2020 20:30:26 +0800 Subject: [PATCH] Address rubocop errors --- lib/apartment/console.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/apartment/console.rb b/lib/apartment/console.rb index c3c9b62f..a2ed609f 100644 --- a/lib/apartment/console.rb +++ b/lib/apartment/console.rb @@ -18,9 +18,15 @@ def reload!(print = true) def st(schema_name = nil) if schema_name.nil? + # rubocop:disable Rails/Output tenant_list.each { |t| puts t } + # rubocop:enable Rails/Output + elsif tenant_list.include? schema_name + Apartment::Tenant.switch!(schema_name) else - Apartment::Tenant.switch!(schema_name) if tenant_list.include? schema_name + # rubocop:disable Rails/Output + puts "Tenant #{schema_name} is not part of the tenant list" + # rubocop:enable Rails/Output end end