Merge commit '71db616fed
' into kb_migration
This commit is contained in:
commit
f18fa97f0c
607 changed files with 3491 additions and 2677 deletions
11
app/helpers/database_helper.rb
Normal file
11
app/helpers/database_helper.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module DatabaseHelper
|
||||
def with_read_replica(&block)
|
||||
ApplicationRecord.connected_to(role: :read, prevent_writes: true, &block)
|
||||
end
|
||||
|
||||
def with_primary(&block)
|
||||
ApplicationRecord.connected_to(role: :primary, &block)
|
||||
end
|
||||
end
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
module DomainControlHelper
|
||||
def domain_not_allowed?(uri_or_domain)
|
||||
return if uri_or_domain.blank?
|
||||
return false if uri_or_domain.blank?
|
||||
|
||||
domain = if uri_or_domain.include?('://')
|
||||
Addressable::URI.parse(uri_or_domain).host
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue