Forum: Ruby on Rails Share Cookies in rails 3.1.3

Posted by kingston.s (Guest)
on 2012-11-20 13:10
(Received via mailing list)
Hi all,


  i am using Rails 3.1.3 and ruby 1.9.3.i need to set the cookies for
multiple domain,
         Example: *test.abc.com* and *example.abc.com* are the two
different domain, i need to set the same cookie for the both domain. If
user login with *test.abc.com* can automatically login with 
*example.abc.com
*..

I have tried :
            Rails.application.config.session_store :cookie_store, :key 
=>
'_Admin_Kernel_session', :domain=>:all
            Rails.application.config.session_store :cookie_store, :key 
=>
'_Admin_Kernel_session', :domain=>".abc.com"
            cookies.permanent.signed[:new_cookie] = {:value => 
new_value,
:domain => ".abc.com"}
            cookies[:some_cookie] = {:value => "whatever", :domain =>
".abc.com", :expires => 1.year.from_now.utc}

            i have tested with  middle-ware to set session domain but no
use.

Please could any one tell me how to implement.

Kingston.s
Posted by kingston.s (Guest)
on 2012-11-21 11:02
(Received via mailing list)
i got the error.Its working now. Its my mistake.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.