0
0
Fork 0

Fix inconsistent naming of Instance.by_domain_and_subdomain (#25159)

This commit is contained in:
Claire 2023-05-31 09:57:24 +02:00 committed by GitHub
parent b86f3596ba
commit b6519ab3f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ class Instance < ApplicationRecord
end
scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) }
scope :by_domain_and_subdomain, ->(domain) { where("reverse('.' || domain) LIKE reverse(?)", "%.#{domain}") }
scope :by_domain_and_subdomains, ->(domain) { where("reverse('.' || domain) LIKE reverse(?)", "%.#{domain}") }
def self.refresh
Scenic.database.refresh_materialized_view(table_name, concurrently: true, cascade: false)