Displaying 20 results from an estimated 11000 matches similar to: "Persistent session cookies?"
2006 Jan 11
2
Book Gap(s)?
As a long-time author of computer books, fairly experienced MVC/OO
thinker/coder, and recent Rails convert, it is probably not
surprising that my midnight ruminations occasionally lead me to
wonder if a Rails book might not be an interesting undertaking. But I
know there are some great titles out there already and undoubtedly
dozens more in the works.
I''m interested in writing
2006 Jan 05
2
Agile Depot Tutorial Help
anyone can explain me why in the Agile Depot Tutorial application they
use i.product_id
to find if a product already exist in the cart, because the cart
contains items, each of them references a product.
I tried i.product_id like in the tutorial
and
i.product.i
all of these 2 notation works , but i find the second seems more
clean??? isn''t it.
Any explanation will be fine
Regards
2006 Jan 12
10
Take Rails Studio Workshop?
In two weeks, Dave Thomas will be in Pasadena doing a three-day Rails
workshop. I''m about to sign up for it. I figure three intense days
with Dave and a few dozen other Rails developers will produce huge
learning leaps for me.
Then it occurred to me that it might be useful to ask the list if
anyone has attended one of these workshops before and, if so, how
valuable you found
2006 Apr 28
3
persistent cookies
hello,
I am trying to implement a "remember be" box for logins, however I cant
seem to get it to work. I have tried the following 2 methods but neither
seem to work. When i check the expiry time in firefox it always says "end
of session".
What is the proper way to handle this so the session cookie "_session_id"
doesnt expire for a year?
I tried
2006 Jan 11
4
Code Shopping in Rails
Back in the horse-and-buggy days when I was cutting my OO eye teeth
on Smalltalk, we had a LOT of conversations about the biggest problem
dealing with a large and growing set of classes and methods in the
Smalltalk image. It became clear that most, if not all, successful
Smalltalk coders spent a lot of their time code-shopping, i.e.,
looking for a class or method that did something they
2006 Jan 24
7
formatting numbers with commas
I needed to format numbers with commas to make it more human
readable. Here''s how I did it.
def commify(number)
c = { :value => "", :length => 0 }
r = number.to_s.reverse.split("").inject(c) do |t, e|
iv, il = t[:value], t[:length]
iv += '','' if il % 3 == 0 && il != 0
{ :value => iv + e, :length =>
2006 Mar 06
2
Cookies & gsub ?
I''m looking to store the current params into a/some cookie(s).
This works:
@params.each_pair do |this_index, this_param|
cookies[this_index] = this_param
end
Except, I get session-only cookies. This doesn''t work:
@params.each_pair do |this_index, this_param|
cookies[this_index] = {
:value => this_param,
:expires => 30.days.from_now
}
end
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 Jan 05
6
Inheritance Question
Hi,
My application has a table of People that has information about
them, and I want to have a subset of those people as Users - people
that can login to the application.
What is the best way to do this? Add columns to People that only
Users would use? I''ve read the threads on single table inheritance,
but it seemed a little bit wasteful: 10,000 people vs 50 users
For those more
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
=>
2006 Jan 03
18
Trying to do a simple thing ...
Hi !
I was talking to a seasider and he asked me if it was easy to do the following
thing using rails :
1) ask a number to the user
2) ask a second number
3) give the addition of the two number and a link to be able to replay
All these things have to be done in one controller and one action, there is no
need for verification and other stuff.
I tried but I''ve got some problems
2006 Jul 27
7
''remember me'' using cookies
I''m about to implement this, and I''m thinking of storing the user''s id and
their hashed password in the cookie after a successful authentication.
can any see an obvious security issue with this? I know the method is
vulnerable to cookie theft but am i missing anything?
thanks
alan
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 Aug 15
4
Cookies and Ruby???
When someone comments on my site, I would like to store the user''s name
as a cookie, and display it the next time they return. I really don''t
know how to do this. Does this use the cgi library? As most things
with ruby, I would imagine it to be quite simple... could anyone post a
code snippet as to how this would work??? Thanks...
--
Posted via
2006 Jan 10
8
first ajax demo in Rails book - does it work for anyone?
Just tried the first AJAX example in the rails book (p.391-392, the
''word guessing'' thing), and the AJAX partial used seems to render as a
full page.
I''m not sure whether it''s
a) a partial bug
b) some interaction between ajax and partials
c) a change since the book came out
or
d) pilot error
I''ve checked the errata pages and it''s flagged up
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,
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.)
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
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
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