Skip to content

Commit

Permalink
Address rubocop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rpbaltazar committed Mar 22, 2020
1 parent fd1cf80 commit 98ec0f7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/apartment/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 98ec0f7

Please sign in to comment.