hi,, i have 2 domains setup and i am having issues. 2 domains, layout
is being picked in applciaiton controller.
1st load after deploy shows correct site, but subsequent reloads just
show same site under both domains. here the routes:
class Subdomain1
def self.matches?(request)
request.domain.include?('foo1.com')
end
end
class Subdomain2
def self.matches?(request)
request.domain.include?('foo2.com')
end
end
Rails.application.routes.draw do
#constraints DomainConstraint.new('foo1.com') do
constraints Subdomain1 do
get '/' , :to => 'jobs#landing' , as: 'jobs_landing'
root :to => "jobs#landing", as: 'root_foo1'
end
#constraints DomainConstraint.new('foo2.com') do
constraints Subdomain2 do
get '/' , :to => 'home#front' , as: 'foo2_landing'
root :to => "home#front"
end #
end
#as you can see, i have tried a DomainConstraint, but that resulted in
same behaviour.
any ideas?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMestJiKTEEM2YppcXOBzqgxXtbUdBOTdQcZ7kmRo_wK1A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment