xxxxxxxxxx
constraints(lambda { |req| ['example.com', 'example2.com'].include?(req.host) }) do
root to: 'index#home'
# more routes here
end
constraints(lambda { |req| ['example3.com'].include?(req.host) }) do
root to: 'community#home'
# more routes here
end
constraints(lambda { |req| ['example4.com'].include?(req.host) }) do
root to: 'archive#home'
# more routes here
end