Removed dead code from apartment config file

This commit is contained in:
cole m alban 2017-02-23 12:03:59 -05:00
parent 80d4df4b34
commit 4783f37dcc

View File

@ -50,29 +50,10 @@ Apartment.configure do |config|
names = (Company.pluck :company_name) - ["IVA"] names = (Company.pluck :company_name) - ["IVA"]
#client = Mysql2::Client.new(
# :adapter => "mysql2",
# :host => ENV['STATS_DB_URL'],
# :username => ENV['STATS_DB_USER'],
# :password => ENV['STATS_DB_PASS']
#)
names.map!{|tenant| tenant.gsub(/'/,'').gsub(/\s/,'')} names.map!{|tenant| tenant.gsub(/'/,'').gsub(/\s/,'')}
#names.each {
# |tenant|
# binding.pry
# if ENV['RAILS_ENV'] == "production"
# client.query("CREATE DATABASE IF NOT EXISTS #{tenant};")
# else
# client.query("CREATE DATABASE IF NOT EXISTS #{tenant};")
# end
#}
# client.close
config.tenant_names = names config.tenant_names = names
#names = (Company.pluck :company_name) - ["IVA"]
#
# ==> PostgreSQL only options # ==> PostgreSQL only options
# Specifies whether to use PostgreSQL schemas or create a new database per Tenant. # Specifies whether to use PostgreSQL schemas or create a new database per Tenant.