Displaying 20 results from an estimated 20000 matches similar to: "cookie has key/value pairs and lost order after JSON decode"
2006 Jan 11
9
Prototype & Cookies
Has anyone written any "cookie" class using prototype?
Basically, what I am looking for is if there is an easy way to store mutiple cookies in a single cookie using hash or something - easy writing and retrieval (updating the cookie value).
For eg -
If I had 25 cookies for my domain 5 of the cookies would either get dropped or not be set (as there is a limit of 20 cookies per domain).
2006 May 11
3
Setting cookie value in test
In the initial version of my application I am just going to require
cookies - down the road _considering_ changing that and providing
something that works without.
Anyway, this is somewhat of a two part question
1. Does this approach make sense or is there a better way typically used?
Just have a before_filter in my application.rb to verify that the
:_session_id cookie is present. If it
2006 May 03
2
render partial collection
my view contains a call to a partial:
<%= render(:partial => ''item_list'', :collection => @keyword.synonyms,
:locals => { :action_delete => "removesynonym", and_some_other_stuff
})
%>
_item_list.rhtml contains:
<%= link_to (
image_tag(''/images/deletebutton.png''),
{ :action => action_delete,
:id =>
2006 Feb 11
2
Session ID in a cookie?
I''ve been looking around for how to store the session ID in a cookie.
The "Agile Web Development with Rails" books seems to indicate that this
is done by default with Rails. But I don''t see a cookie being set in my
browser. (yeah, they''re enabled)
I poked through the RForum code to find something referencing "cookies"
but nothing came up.
Does
2008 Jun 24
1
cross domain cookie
My rails server runs on localhost. I want to set a cookie for the
domain ".myapp.com". How do I do this?
(i tried cookies[''xyz] = {:value => ''abc'' ,:domain => ''.myapp.com''} .
It doesnt work. No cookie is being set when i specify domain like
that.
thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this
2023 Mar 03
3
[PATCH] docs: Prefer 'cookie' over 'handle'
In libnbd, we quickly learned that distinguishing between 'handle'
(verb for acting on an object) and 'handle' (noun describing which
object to act on) could get confusing; we solved it by renaming the
latter to 'cookie'. Copy that approach into the NBD spec, and make it
obvious that a cookie is opaque data from the point of view of the
server. Makes no difference to
2010 Nov 14
1
RCurl and cookies in POST requests
Hello.
I know that it's usually possible to write cookies to a cookie
file by removing the curl handle and doing a gc() call. I can do
this with getURL(), but I just can't obtain the same results with
postForm().
If I use:
curlHandle <- getCurlHandle(cookiefile=FILE, cookiejar=FILE)
and then do:
getURL(http://example.com/script.cgi, curl=curlHandle)
rm(curlHandle)
gc()
it's
2001 Nov 15
2
X11 cookies and forwarding
I'm guess I wasn't following the whole cookies discussion completely
(putting cookies in /tmp to avoid putting them on NFS, etc.), but I
noticed today that with 2.9.9p2, if I use "ssh -X" to start a shell on the
server, in that shell XAUTHORITY is set to /tmp/ssh-XXXXXXXX/cookies and
there are cookies placed there there. These are the "fake" cookies for
the
2007 Jan 29
2
rspec and cookies
Hello
can anyone tell me how to test cookies using rspec? specifically, I''d like
to be able to set a cookie before a get/post request and also to test the
cookies which have been set by a get/post request
I know I can use cookies[:name] = ''value'' to set a cookie but how would I
set expiry information on such a cookie? when i try to pass a hash {:value
=>
2008 May 17
4
Setting cookies in service overloader thingo
I''m implementing a simpler version of the Cookie Session Store in
Rails 2.0. If you know what that is, skip the next paragraph.
A cookie session store stores the session data inside cookies, on the
client, and signs them using a secret string, hashed together. The
user can decode the cookie easily if they know much about computers
and see what''s inside, but they
2006 Jan 14
2
Why can''t I changed the _session_id cookie?
Hi,
I noticed that there is a cookie set by my rails scaffold that contains
a 32 character hash code in it, but when I tried to change its value
using Cookies[:_session_id], nothing happened, it stays the same!
How am I supposed to change the session_id?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Jan 07
2
can store array or hash in cookies?
Hi
According to rdoc: value - the cookie''s value or list of values (as an
array).
So, I can use arrays, briliant.
But.... It does not work (at least on webrick)
I wrote a controller:
def check_cookies_first
cookies[:chef] =
{:value => ["first", "second"], :expires => Time.local
(2020)}
render_text ":)"
end
def
2006 Jan 27
3
Problem setting multi-value cookie
I''m trying to set a multi-value cookie but for some reason it''s not
working. Any help would be appreciated.
cookies[:user] = { :value => {:email=>params[:login][:email],
:passwd=>params[:login][:passwd]}, :expires => 30.days.from_now, :path
=> "/login"}
--
Thiago Jackiw
2007 Aug 17
1
Cookie Sessions in Merb?
I like the cookie sessions that Rails edge has - they make sense,
they''re fast, easy.
For those that don''t know: the default session mechanism is to give
developers a Hash called session. To store this object between
requests it Marshals the session object and sends the object itself
(now as a bitstream) back to clients to store in their cookie file. To
prevent users from
2006 Jul 10
2
cookies rendering in view
...i don''t know what to do! obviously, this is probably more simple than
what i''m going through now(at least i can say i dear hope so) but i''m
having a terrible time trying to use cookies[:something]...
explination:
i have already implement a nice working cute forum, and i was hoping to
put the client/forum-user''s username and email into the corresponding
2006 Dec 01
2
Mongrel 0.3.18, rails 1.1.6 and cookies
I''ve run into an issue with my rails application being unable to
properly set cookies on Mongrel 0.3.18. If I run the simplified code
below in Mongrel 3.14.4, both cookies are properly sent to and saved
by the browser. With the same code in 0.3.18, only the auth_token
cookie is created (if I switch them, only the userid as it will only
properly create the first cookie in the list.)
2007 Oct 04
1
Cookies in RSpec
So how do you work with cookies properly in rspec now? I noticed in
the docs that it mentions session, assigns, and flash, but nothing of
cookie. I''m using edge rails so I''m concerned about changes to the
cookie mechanisms. I need to assign values into the cookie (a
remember token for restful authentication) so that I can have it log
in by cookie. here is my spec
2001 Nov 15
1
X11 cookies and forwarding (fwd)
On Thu, 15 Nov 2001, Dan Astoorian wrote:
> Date: Thu, 15 Nov 2001 16:09:20 -0500
> From: Dan Astoorian <djast at cs.toronto.edu>
> To: Ed Phillips <ed at UDel.Edu>
> Subject: Re: X11 cookies and forwarding
>
> On Thu, 15 Nov 2001 15:46:22 EST, Ed Phillips writes:
> > I'm guess I wasn't following the whole cookies discussion completely
> >
2006 Mar 09
4
cross domain cookies
Does anybody know how to access the domain of a cookie from inside rails?
I am try to integrate phpbb forums into my site and one of the things phpbb
does is store a cookie. The forums are at forums.domain.com and the site is
www.domain.com so i needed to set the cookie domain in phpbb to just be
".domain.com" so both sites can access it. The trouble is when using
cookies[] in rails,
2012 Apr 25
8
showing error (gsub) when switching from session to cookies
I am newbie to rail. Trying to develop social networking site so working
with railspace application. Everything is working fine but I stuck in
the problem when i am giving the authorization tocken to the user to
remember him/her.
My Error and controller code is below
Error:-
private method `gsub'' called for 4:Fixnum
C:/Users/Amir/Downloads/IR/ruby/lib/ruby/1.8/cgi.rb:342:in