Displaying 20 results from an estimated 4000 matches similar to: "Why can''t I changed the _session_id cookie?"
2006 Mar 21
13
"Remembering" link to redirect to after logging in
Hi,
Suppose I have a resource such as http://localhost:3000/topsecret/data
that requires the user to login first.
What I did was make use of before_filter to check and see if the session
variable is set with the logged in user''s id (similar to the example in
"Agile Web Development with Rails").
However while the filtering function does work correctly in redirecting
the
2006 Jan 13
5
Form field naming semantics question
Hi,
I have a question today regarding how the various form elements in
_form.rhtml are named.
I understand that for a database table "persons" with a column headed by
"name", then in _form.rhtml it will probably be like:
<p><label for="person_name">Name><br/>
<%= text_field ''person'', ''name''
2006 Mar 21
4
Using onSubmit tag in form_tag?
Hi guys,
I have been working on a form that would use javascript to validate the
data before submitting it, and from my view.rhtml I have a statement
like this:
However such a statement generates a HTML tag that looks like this:
<form action="/users/Login?onSubmit=validate%28%29" method="post">
Seems like Rails thinks it is a parameter instead of an option, so
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 Mar 23
1
Implementing a model with logging?
Hi,
I''ve been trying to work out a model (let''s say a StudentRecord) which
has a number of attributes, and the key thing I''m trying to do here is
to implement it such that you can actually view modifications made over
time by various users (think of it as a wikipedia style of logging).
Is there some provision in rails that''d provide this functionality for
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 Feb 04
1
Error when using form helper and child objects
Hi,
This is one problem that has gotten me stumped for quite a while. I have
an Item that has_many :DeliveryMethod, and what I seek to achieve is to
create a form that''d let me create an Item, as well as its
DeliveryMethods in 1 single form.
And so I tried something like:
<%= text_field_tag ''Item[DeliveryMethod][price]'', @Item.DeliveryMethod
?
2006 Jan 17
2
Instant Rails request lags >4 sec
Hello RoR folks,
I am using Instant Rails and a small app that currently uses scaffolding
for CRUD on just one table with 7 attributes. I am not shure wether
scaffolding slows down the app that much but I have a time lag for every
request with above 4 sec. The preinstalled apps like Type are running
damn fast, which is not the case for my stuff.
Any help on this would be great
Thanks,
RTG
--
2006 Mar 24
1
Modifying a session variable from a different process?
Hi,
I''ve implemented a log in session "thing" that essentially works by
holding the model of the logged in user in a session variable, like
this:
session[:user] = user
However let''s say at this point in time, should an administrator of the
system decide to revoke this user''s account, the session variable for
that currently logged in user is still valid,
2006 Jan 12
1
Does rails support method overloading?
I''ve tried to have 2 methods of the same name (but with different
parameter signatures) and it always seems like the later declaration
tends to win out, does this mean that ruby does not support overloading?
If so what aboutt the .new method? You can either call it as .new (with
nothing) or .new(hash variable). Is it possible to override a specific
instance of the zero parameter
2006 Jan 18
22
Creating multiple child objects from the same form
I''ve been digging into rails, but this one question has been a two day
stumper. I''ve got a question/answer model that I''m trying to work out.
Each question has multiple answers (they''re more like choices, it
doesn''t matter whether they''re right or wrong), and I''d like to have the
question creation form also have multiple fields in
2006 Apr 27
4
Sessions Problems
Hi to group!
I am new to ROR!
I am facing problems on sessions.
First I created the one session variable.
after that I created the other one.
after moving to three pages the session was destroyed automatically.
What is the reason please help me!
Thnaks and Regards,
-Kumar Varma
--
Posted via http://www.ruby-forum.com/.
2008 May 27
1
session question - unique identifier in cookie store?
Hi,
I recently switched to the cookie session store for my rails app, and I am
wondering how I can access some kind of unique identifier for each session
between requests. It used to be (when I was using active record store) that
the session id was set and that string didn''t change between requests. Now,
of course, the session id does change between requests because that is where
the
2006 Dec 27
3
ARSession Woes!
I''m having an issue with ARsessions... I have a rails app AND a merb app
both under the same domain... I have redirects working for this to be
seamless... however, the session started on merb is different than the
session started in the rails app... like so..
http://pastie.caboo.se/private/r1ar42qiaekrqjdt6y
Any ideas why?
The only difference I see, but dunno where to change this, is
2006 Apr 18
1
''depot''app, trouble with session / cookies
Many of you probably know the ''depot'' app from the ''Agile Rails
development'' book.
When the view changes from ''Store'' to ''display_cart,'' a session
containing the shopping-cart (:cart) is supposed maintain the ''cart''
between calls, but when the display_cart stub view shows up, I have
always ZERO elements
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
2007 Aug 16
3
Sessions on Rails with Pound and Mongrel
Hi All,
I''m experiencing a problem when using pound with Rails. My set up is I
have a machine acting as a load balancer running Pound. This listens
on port 80 and directs requests with a particular URL to two backend
servers both of which are serving my rails app using mongrel cluster
on ports 9000,9001 and 9002. There is a problem with sessions even
though I am storing the session data
2006 Jun 20
3
Maintaining same session for a user across different PCs
Hi,
I''m trying to make a simple shopping cart, where I want to maintain
state when a use logs in from different location. Consider the
following :
1. ''foo'' logs in from home pc and add ''bar'' item to the cart.
2. ''foo'' goes to office and logs in from office PC.
3. Now I want only one session for ''foo'', so that when
2006 May 17
3
Session in ActiveRecordStore
The Agile book seems to say I should specify this as follows, probably in the
environments.rb:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] =
CGI::Session::ActiveRecordStore
BUT the environments.rb file would have me Un-Comment this:
config.action_controller.session_store = :active_record_store
Anyway, I''ve tried both, and in both cases it
2006 Apr 16
9
''depot'' app, where''s session?
Many of you probably know the ''depot'' app from the ''Agile Rails
development'' book.
I have constructed the ''products'' model, the Store-controller, and the
''Cart'' and ''Line Item'' classes. I have told Application-controller about
:cart and :line_item:
model :cart
model :line_item
Here''s part of