On May 21, 2011, at 9:33 AM, Bharat Ruparel wrote:
Is there a way for Rails to read cookies written by a Javascript and
read by Rails? -- I am integrating a third party software service
which
writes a cookie to the user's browser which contains routing
information. I need to make sure that the Rails app and the third
party
app both have the same information, all the time.
Thanks.
Bharat
Sure. Just make sure that your JavaScript is writing the cookie to the
current domain, and you should be able to read it with
cookies[:yourKeyName] where:yourKeyName is the "name" assigned to the
cookie from JavaScript.
IF you haven't settled on a cookie wrapper, google cookiejar.js for an
elegant solution.
Walter
--
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-
[email protected].
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.