Dynamic session domain


#1

I’m trying to use one Rails app on different domains at the same time. I
also use subdomains. According to some tip I use:

session :session_domain => ‘.domain.tld’

in application.rb

How can I access request object so I can do:

session :session_domain => “.” +
request.host.split(’.’)[-3…-1].join(’.’)

Thanks