Displaying 20 results from an estimated 10000 matches similar to: "Persistent form data (using sessions?)"
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 May 12
5
how long before deleting sessions ?
What is the recommended amount of time to keep sessions around in the
database (i store them in a sessions table). IF you get 1 million requests
per day you are going to get 1 million new session entries in the DB. This
would need some serious cleaning so just wondering what a safe cleanup time
would be.
Also does anyone know how to prevent new sessions records from being created
if session
2006 Jan 11
1
fiile_column persistent across different forms
is there a way to keep the file_column field in the form persistent
across diffferent view templates ?
In my controller (same controller for both views) i do
@post = Post.new
in the view i do
form_step1.rhtml
---------------------
<%= file_column_field "post", "image" %>
<% if @post["image"] %>
<%= image_tag url_for_file_column("post",
2006 May 09
3
validations erasing the form
Hi there
I have a for with a couple of text_fields. I''m doing some validation
via the model and when the validation "works" I get there was an error
on blah blah
the problem is the form is erased and I have to fill up the form again!
I saw that scaffold keeps the form filled when the validation "works"
but I dont know exactly what''s making it happen!
I would
2006 Apr 05
11
session error in rails 1.1
I keep getting this error in rails 1.1, does anybody know what it means? My
site will be working fine, i do some more development, get a parse error,
and then all of a sudden the page 404''s with the following error
Session contains objects whose class definition isn''t available
Remember to require the classes for all objects kept in the session.
(Original exception:
2006 May 23
2
additional fields in session DB table
I am using active record sessions and everything works fine. I am
integrating it with phpbb however so i need some extra fields populated in
the session table. In application.rb i put a before_filter to update the
session table
I have a model for the sessions
$ more app/models/session.rb
class Session < ActiveRecord::Base
set_primary_key "session_id"
set_table_name
2006 Jan 12
5
file_column preview in multistage forms
i have a 2 step form which contains 1 file_column field.
The second form is just "This is how your post will look" kind of form
and the user can click Edit (to take them back to form1) or Submit.
If the user clicks edit it takes them back to the first form with
fields populated. I have it working with all text fields, I just dont
know how to do this with file_column field (showing the
2006 Jan 20
8
validates_confirmation_of not working
is there any special requirement for validates_confirmation_of ? I am
trying to make sure 2 passwords are equal (cleanly the rails way)..
In my view i have two fields with id user[password] and
user[password_confirmation].
in the model i have
validates_confirmation_of :password, :message =>"Passwords do not match "
Am i missing something here ?
thanks
adam
2007 Apr 16
6
How to use a form.check_box ?
Hey guys,
I''m trying to have a simple webform in my administration section to
add a user. I have the text_fields for adding the user''s name,
password, and password confirmation, but cannot seem to figure out the
checkbox. I want it to be a single checkbox, that if clicked, will set
the database column "access" to be "admin" and if its unchecked, set
it to be
2006 Apr 19
3
best way to check session for nil
Hello,
What is the best way in rails to check a session hash value for nil ? I
have a session hash called user (session[:user]) that sometimes I have to
check for a certain variable like session[:user].email. however the
following always results in an error
if session[:user].email
and I always have to do
if session[:user] and session[:user].email
Is there a cleaner way to do this then
2010 Aug 02
7
Persistent SSH sessions
Hi all
I have an ADSL modem which reboots when there is a power cut and the
inverter (UPS) kicks in. Internet access is down for a duration of 1
to 2 minutes while the modem boots.
I have many SSH tunnels and shells active. Due to the default
"TCPKeepAlive On" setting, these sessions are terminated almost
immediately.
I tried the following configuration:
sshd_config on server:
2006 Jan 13
2
file_column in session
is it possible to store a field of type file_column in the session?
Rails crashes on me every time i try to do something like the
following:
@session[:newpost] = @params[:post]
however if i assign each field of @params[:post[ except for
@params[:post]["image"] i have no problems. Is there something that
should be done to allow the file in the session?
thanks
adam
2006 Jan 27
6
Scaffolding to use has_many and belongs_to ?
What does everyone on this list think about enhancing scaffolding
somehow so that a "has_many" relationship will automatically drop the
<select> box into the view to reference the "belongs_to" part of the
view?
I think scaffolding is great but I am always adding the <select> boxes
to reference the parent association. Do you think this would be
useful? just a
2007 May 01
0
select tag for collection form
I am trying to update multiple objects (in a collection) from a single
form.
I found an explanation of how to do it for text_fields in the Agile
book (v2, P.499 PDF), but I can''t figure out how to do the same thing
for a select group.
I would really appreciate some help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2006 Jan 19
5
reload controller with FCGI
since webrick does not need to run with FCGI how do you get a rails
app in FCGI mode to reload the controller (since it caches in
production). Is it simply a restart of apache ?
adam
2006 Jan 04
6
ajax in rails is a security violation
Does anybody have any issues with the AJAX code inside rails? Whenever i
use any sites i have built, or even external sites (such as basecamphq) my
internal security device blocks access to the Ajax piece with a 400 Bad
Request ( i scoured the net for other ajax examples and no isses anywhere
else). I think there is something in the AJAX code of rails that is not
implemented correctly. Has
2006 Jun 12
3
Multiple Form Fields with Same Model?
Hello,
I''m trying to create a form that will allow a user to submit a list of
phone numbers, but the list is dynamically created. Thus allowing my form
to submit an unknown number of phone numbers.
Here is some of the code I have been trying:
<%= collection_select( "phone[]", "phone_type_id",
PhoneType.find(:all, :order => "position"),
2006 Jan 07
4
set date with date_select
when retreiving a date from a DATETIME field in a database, is there a
way to set the date to the value of the DB in the view? It seems to
always default to the current date...
if I have a field called birthdate in the users table and i do
@user = User.find(@params[:id])
in my view i have a <%= date_select ''birthdate'',''user'' %>
but dont know how to
2006 Jan 17
6
Rails Best Practices Page
Hey,
I have been progressively learning more and more rails each day
(from both a current project, reading the agile book, and this list).
Does anybody think it would be beneficial to have kind of like a rails
"Best Practices" page that lists some of the better ways of handling
certain functions of rails (that are common in most apps) that are
both more elegant, and efficient.
For
2006 Aug 16
4
Overwrite form helper methods and call old ones in new ones?
Hi all
All my forms should look the same, so I think always putting the right
div etc. tags around them is a violation of the DRY principle.
Until now my forms look like that:
<div class="text_field">
<label for="news_item_subject">Subject:</label> <%= text_field
"news_item", "subject" %>
</div>
Now I want the default