mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 03:37:40 +00:00
Changes to local
This commit is contained in:
parent
a2d7d91615
commit
b3a80da10f
@ -3,7 +3,6 @@ class DashboardController < ApplicationController
|
||||
|
||||
def index
|
||||
@results = Result.page(params[:page]).per(5)
|
||||
|
||||
end
|
||||
|
||||
def deny_to_visitors
|
||||
|
||||
@ -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
|
||||
end
|
||||
|
||||
@ -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!
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user