Displaying 20 results from an estimated 11000 matches similar to: "Setting cookie value in test"
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
2005 Dec 13
3
Forcing the session-id
We''re going to have problems keeping cookies across domains. We want
people to shop in one domain (e.g. "booksareus.com") and then checkout
on the same server securely under a different domain (e.g.
"greatbooks.com"). When we make the jump to the secure domain (the
checkout link) can we submit the user''s session ID along with it and
have it
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 Apr 03
4
Layout Question w/ code from vendor library
I am new to Ruby on Rails in general and apologize if this question is
trivial and/or has been asked before ( my searches did not turn up any
threads ).
I am using the cookies function from actionpack which I have located in
my vendor/rails/actionpack directory.
Using:
cookies[:username] and cookies[:password]
from within a controller file works just fine, I am able to set and read
2006 Mar 10
7
Problem saving data in different languages
Hi, I currently have a site that lets people enter info and submit it to
the database. But the problem is the it lets people enter data in their
language (portuguese and spanish) and all the special characters for
those languages get replaced by symbols. Any idea how would I fix that?
Thanks a lot.
--
Posted via http://www.ruby-forum.com/.
2006 Mar 13
4
Storing model object in session in EdgeRails
I''m having a problem with sessions since upgrading to EdgeRails. Against
certain recomendations, I''m storing the current user''s model object in
the session. This worked fine in 1.0 and earlier, but now I am noticing
that any time I reference the associated objects for an object stored in
the session, the associated objects get copied into the session! For
example,
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/.
2007 May 10
5
Setting P3P header before Set-Cookie
Hi folks,
For a project I''m working on, I need to set an HTTP header BEFORE the
Set-Cookie header is sent. Basically, I need to send along our compact
privacy policy before the cookie is set.
I''ve tried using:
@headers[''P3P''] = "P3P: blah blah blah..."
...but the problem is that no matter what I do, the Set-Cookie header is
sent first, and the P3P
2006 Apr 05
3
"partitioning" table access
Hopefully someone can give me some advice on how to approach this
problem... I''m getting ready to start a large new project where
several different organizations would be working with a lot of tables.
Each table would have an organization_id field to signify which
organization owns that record. Organizations would only be able to
view/edit records they own. Potentially thousands of
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
2006 Apr 19
2
Beginner problem with foreign keys
Hi, I''ve been trying to get this to work all night. I''ve made some
progress by reading other posts, but I''m stuck now and can''t figure out
what I am doing wrong.
I have two tables: application_users and user_types. In my
application_users table I have a field named "user_type_id". At first,
I thought if I set up the foreign key with the correct
2005 Nov 08
2
Scriptaculous insertion fails when XHTML Strict used in FireFox
Hi !
I'm getting an uncaught exception requiring the Scriptaculous
libraries when everything says XHTML 1.0 Strict:
class ApplicationController < ActionController::Base
before_filter :set_content_type
protected
def set_content_type
response.headers['Content-Type'] = 'application/xhtml+xml;
charset=ISO-8859-1'
end
end
<?xml version="1.0"
2006 Mar 10
2
adding to has_many on create and edit
Hello,
I am fairly new to RoR and I have a question I hope can be solved
elegantly (so many things are, so why not this one too?). I have a
working solution, but I want to be sure I am doing things the "rails
way" (having come from PHP). You could say I am looking for a little
validation (no flames please).
I have a table of units like so:
CREATE TABLE `units` (
`id`
2007 May 17
4
How to mock helpers in view specs ?
Hi all,
I am mocking the following Rails view (inside a partial):
<%= render :partial => "forums/forum",
:collection => forum_category.forums.readable_by(current_user? ?
current_user : nil) %>
My spec fails with the following message:
1)
ActionView::TemplateError in ''forum_categories/index (anonymous user)
should only render forums accessible to anonymous
2005 Dec 07
5
InPlaceEditor update of page contents ?
Hi all !
InPlaceEditor refreshes only the element that was updated. Is there
any way to make it update tons of other stuff ?
I have a table where changing a value in it causes changes in most
other cells (weight to percentage to money).
Thanks for any help !
--
François Beausoleil
http://blog.teksol.info/
_______________________________________________
Rails-spinoffs mailing list
2006 Jul 26
2
ResponseLogger Plugin
http://www.agilewebdevelopment.com/plugins/responselogger
From the README:
Ever wondered what exactly Rails returned in an RJS response ? Here''s
your chance to see it:
===> text/javascript (49 bytes)
Element.replace(''target'', ''<em>It works!</em>'');
<===
== ResponseLogger
Logging the response value is easy. Simply install
2006 Jan 24
4
Laszlo on Rails, Flash GUI
Ruby Forum Search did not work, and I did not find any postings about
http://laszlo-plugin.rubyforge.org/. OpenLaszlo is a framework handling
the GUI part, or the V in MVC. See
http://www.laszlosystems.com/lps/laszlo-in-ten-minutes/ for info about
Laszlo itself.
My question is, does anybody have experience with this framework,
especially combined with Rails?
Or, could I get some of the best
2006 Dec 08
2
Windows Tempfile Fix Plugin
Hi all,
Yesterday, I had some problems reading JPG files in my tests. Turns
out the problem was that Windows Ruby doesn't set it's Tempfile to
work in binary mode. Since I deploy on Linux, that has never been a
big problem, but now I'm working on some software that works with
binary files exclusively.
Anyway, I am making this fix available as a Rails plugin.
The details can be
2006 Dec 08
2
Windows Tempfile Fix Plugin
Hi all,
Yesterday, I had some problems reading JPG files in my tests. Turns
out the problem was that Windows Ruby doesn't set it's Tempfile to
work in binary mode. Since I deploy on Linux, that has never been a
big problem, but now I'm working on some software that works with
binary files exclusively.
Anyway, I am making this fix available as a Rails plugin.
The details can be
2006 May 27
5
Rails without cookies
Why does rails keep installing cookies on users machines, even if I am
not ussing th session variable for anything?
How do I stop this?
Thanks, Scott
--
Easily help charity when you shop: www.GiveTeam.org
I''m a member of the Give Team, are you?