title: What does Rails 3 session_store domain :all really do?
body: <p><strong>Updated question to make it more clear</strong></p>
  <p>I understand that you can set the domain of your session_store to share sessions between subdomains like this: <code>Rails.application.config.session_store :cookie_store, :key =&gt; '_my_key', :domain =&gt; &quot;mydomain.example&quot;</code></p>
  <p>in Rails 3, what does the setting <code>:domain =&gt; :all</code> do? It can't let you share sessions across top-level domains, cookies can't do that. The documentation says it assumes one top level domain. So what happens if multiple domains access your app?</p>
  <p>In my app, my users can create personal subdomains of one main domain, but then can also access that subdomain via their own custom domain.</p>
  <p>What is the correct session_store domain setting so that I can:
  a) share sessions across all domains of my primary domain, eg <code>mydomain.example</code>
  b) users who access their personal subdomain eg &quot;user1.mydomain.example&quot; via a CNAME custom URL like <code>some.otherdomain.example</code> can still create separate sessions.</p>