mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 11:47:41 +00:00
Changes to local
This commit is contained in:
parent
a2d7d91615
commit
b3a80da10f
@ -3,7 +3,6 @@ class DashboardController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
@results = Result.page(params[:page]).per(5)
|
@results = Result.page(params[:page]).per(5)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def deny_to_visitors
|
def deny_to_visitors
|
||||||
|
|||||||
@ -5,9 +5,7 @@ class SessionsController < Devise::RegistrationsController
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
binding.pry
|
|
||||||
resource = warden.authenticate!(:scope => :user)
|
resource = warden.authenticate!(:scope => :user)
|
||||||
binding.pry
|
|
||||||
sign_in(:user, resource)
|
sign_in(:user, resource)
|
||||||
if !current_user.admin
|
if !current_user.admin
|
||||||
Apartment::Tenant.switch!(Company.find(current_user.company_id).company_name.gsub(/'/,'').gsub(/\s/,''))
|
Apartment::Tenant.switch!(Company.find(current_user.company_id).company_name.gsub(/'/,'').gsub(/\s/,''))
|
||||||
|
|||||||
@ -7,7 +7,6 @@ class Company < ApplicationRecord
|
|||||||
private
|
private
|
||||||
|
|
||||||
def create_tenant
|
def create_tenant
|
||||||
binding.pry
|
|
||||||
if company_name != "IVA"
|
if company_name != "IVA"
|
||||||
Apartment::Tenant.create(company_name.gsub(/'/,'').gsub(/\s/,''))
|
Apartment::Tenant.create(company_name.gsub(/'/,'').gsub(/\s/,''))
|
||||||
Apartment::Tenant.switch!
|
Apartment::Tenant.switch!
|
||||||
|
|||||||
@ -13,9 +13,6 @@ default: &default
|
|||||||
adapter: mysql2
|
adapter: mysql2
|
||||||
encoding: utf8
|
encoding: utf8
|
||||||
pool: 5
|
pool: 5
|
||||||
username: <%= ENV['TEST_USER'] %>
|
|
||||||
password: <%= ENV['TEST_PASS'] %>
|
|
||||||
socket: <%= ENV['TEST_SOCKET'] %>
|
|
||||||
|
|
||||||
stats_development: &stats
|
stats_development: &stats
|
||||||
adapter: mysql2
|
adapter: mysql2
|
||||||
@ -34,8 +31,8 @@ stats_test:
|
|||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: Pearlception_development
|
database: Pearlception_development
|
||||||
username: root
|
username: <%= ENV['DEV_DB_USER']%>
|
||||||
password: Kemitscafe1
|
password: <%= ENV['DEV_DB_PASS']%>
|
||||||
|
|
||||||
# Warning: The database defined as "test" will be erased and
|
# Warning: The database defined as "test" will be erased and
|
||||||
# re-generated from your development database when you run "rake".
|
# re-generated from your development database when you run "rake".
|
||||||
@ -43,8 +40,8 @@ development:
|
|||||||
test:
|
test:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: Pearlception_test
|
database: Pearlception_test
|
||||||
username: root
|
username: <%= ENV['DEV_DB_USER']%>
|
||||||
password: Kemitscafe1
|
password: <%= ENV['DEV_DB_PASS']%>
|
||||||
|
|
||||||
# As with config/secrets.yml, you never want to store sensitive information,
|
# 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
|
# like your database password, in your source code. If your source code is
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user