5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 12:56:23 +00:00

Eliminar el punto final de los dominios

This commit is contained in:
f 2021-09-12 20:51:24 -03:00
parent 1a56d19457
commit 955604b05a

View file

@ -32,7 +32,8 @@ class AddHostnameToDeploys < ActiveRecord::Migration[6.1]
site.name = site.name.split('.', 2).first if site.name.include?('.') site.name = site.name.split('.', 2).first if site.name.include?('.')
site.deploys.find_each do |deploy| site.deploys.find_each do |deploy|
deploy.update_columns hostname_tmp: (deploy.values[:hostname] || deploy.values[:onion] || deploy.hostname || "#{SecureRandom.hex}.invalid") hostname = (deploy.values[:hostname] || deploy.values[:onion] || deploy.hostname || "#{SecureRandom.hex}.invalid").dup.sub(/\.\z/, '')
deploy.update_columns hostname_tmp: hostname
end end
end end