diff --git a/Pearlception/app/controllers/dashboard_controller.rb b/Pearlception/app/controllers/dashboard_controller.rb index 10a757e..2d4b600 100644 --- a/Pearlception/app/controllers/dashboard_controller.rb +++ b/Pearlception/app/controllers/dashboard_controller.rb @@ -3,7 +3,6 @@ class DashboardController < ApplicationController def index @results = Result.page(params[:page]).per(5) - end def deny_to_visitors diff --git a/Pearlception/app/controllers/sessions_controller.rb b/Pearlception/app/controllers/sessions_controller.rb index 528ff53..2b4870e 100644 --- a/Pearlception/app/controllers/sessions_controller.rb +++ b/Pearlception/app/controllers/sessions_controller.rb @@ -5,13 +5,11 @@ class SessionsController < Devise::RegistrationsController #end def create - binding.pry resource = warden.authenticate!(:scope => :user) - binding.pry sign_in(:user, resource) if !current_user.admin Apartment::Tenant.switch!(Company.find(current_user.company_id).company_name.gsub(/'/,'').gsub(/\s/,'')) end redirect_to "/" end -end \ No newline at end of file +end diff --git a/Pearlception/app/models/company.rb b/Pearlception/app/models/company.rb index e38d444..d242a5e 100644 --- a/Pearlception/app/models/company.rb +++ b/Pearlception/app/models/company.rb @@ -7,7 +7,6 @@ class Company < ApplicationRecord private def create_tenant - binding.pry if company_name != "IVA" Apartment::Tenant.create(company_name.gsub(/'/,'').gsub(/\s/,'')) Apartment::Tenant.switch! diff --git a/Pearlception/config/database.yml b/Pearlception/config/database.yml index d5624af..60cdd74 100644 --- a/Pearlception/config/database.yml +++ b/Pearlception/config/database.yml @@ -13,9 +13,6 @@ default: &default adapter: mysql2 encoding: utf8 pool: 5 - username: <%= ENV['TEST_USER'] %> - password: <%= ENV['TEST_PASS'] %> - socket: <%= ENV['TEST_SOCKET'] %> stats_development: &stats adapter: mysql2 @@ -34,8 +31,8 @@ stats_test: development: <<: *default database: Pearlception_development - username: root - password: Kemitscafe1 + username: <%= ENV['DEV_DB_USER']%> + password: <%= ENV['DEV_DB_PASS']%> # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". @@ -43,8 +40,8 @@ development: test: <<: *default database: Pearlception_test - username: root - password: Kemitscafe1 + username: <%= ENV['DEV_DB_USER']%> + password: <%= ENV['DEV_DB_PASS']%> # As with config/secrets.yml, you never want to store sensitive information, # like your database password, in your source code. If your source code is