Jabulani wrote:> I want to set default cookie domain for my application to
> ".mydomain.com" to allow cookie session be preserved across
> subdomains.
> I use => config.action_dispatch.session = {:domain =>
> ".mydomain.com"} in application.rb, but thats not working. The
cookie
> is saved as ''mydomain.com''
>
> Thanks for the help!
Try: Rails.application.config.session_store :cookie_store,
:key => ''_app_session'',
:domain =>
''.mydomain.com''
I coved this in a blog post as we ran across this issue today:
http://blog.bitzesty.com/rails-3-default-cookie-domain-for-subdomains
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.