Share Cookies in rails 3.1.3

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

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=>“” cookies.permanent.signed[:new_cookie] = {:value => new_value, :domain => “”} cookies[:some_cookie] = {:value => “whatever”, :domain => “”, :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.


i got the error.Its working now. Its my mistake.