/ / Più sottodomini nelle rotte: ruby-on-rails, heroku, ruby-on-rails-4

Più sottodomini nelle rotte: ruby-on-rails, heroku, ruby-on-rail-4

Quindi ho:

class MainSite
def self.matches?(request)
request.subdomain.blank? || request.subdomain == "www"
request.subdomain.blank? || request.subdomain == "limitless-tor-hello" && "rocky-depths-buhbye"
end
end

Ma il routing funziona solo per un numero illimitato e non roccioso. È possibile far funzionare entrambi? Ho provato a usare l'operatore && che ovviamente non ha funzionato.

Per favore aiuto!

Grazie!

risposte:

1 per risposta № 1

Prova questo:

class MainSite
def self.matches?(request)
request.subdomain.blank? || request.subdomain == "www"
request.subdomain.blank? ||
request.subdomain == "limitless-tor-hello" ||
request.subdomain == "rocky-depths-buhbye"
end
end