similar to: :session_expires usage

Displaying 20 results from an estimated 20000 matches similar to: ":session_expires usage"

2006 Feb 09
1
session cookie expiration
from the Agile Book, i see i can set the absolute session expiry time via: ActionController::CGIRequest::DEFAULT_SESSION_OPTIONS[:session_expires] however, I don''t see anything about what the actual default setting is when a session is created. also, is there a way to set the expiration to happen when the browser is closed? in PHP, this can be accomplished using
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
2007 Jul 11
1
Session Expiration Problem: How to keep a user logged in for
How do I keep the Rails session from expiring when the browser exits? I would ideally like the user to be logged for a few days (e.g. 2 weeks). Do I use the Rails "session" or "cookies"? Also, my understanding is that session[:session_expires] doesn''t work. Thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~
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 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
2005 Dec 15
5
Action Mailer - connection refused - connect(2)
hi: I am on Mac OSX 10.4 using locomotive. My ActionMailer configuration is ActionMailer::Base.delivery_method = :smtp # or :sendmail or test ActionMailer::Base.server_settings = { :address => "mail.albertafilmworks.com", :port => 25, :domain => "brucebalmercanada.com" } ActionMailer::Base.perform_deliveries = true
2005 Dec 20
9
Rails Configuration Question
Hello Everyone, I have been reading this mailing list for a while and am impressed with the generous help that many here are eager to provide. Perhaps someone will be able to shed some light on a configuration issue I am having. Thank you in advance for any assistance. First, system setup details: #System Setup# * OS: Fedora Core 4 running in a VMWare box on Windows XP * Database: MS SQL
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
2005 Dec 15
4
rake migrate ignores '':null => false'' on mysql
I wanted to add a login string column to an existing table => I created a migration : ... def self.up add_column "members", "login" , :string, :null => false end ... remark: it shouldn''t work, as the table is not empty (=> ''login'' would be null in the existing rows.) problem: rake migrate didn''t complain
2006 Jan 08
6
Persistent session cookies?
It seems Rails sessions by default only last, well, a browsing session. If the Rails app keeps track of logged-in state by sessions, that state doesn''t survive restarting the browser. How best to change this behaviour, to make the session cookie live forever, or at least beyond browser restarts? It was suggested to me on IRC to combine sessions with code to generate a unique id and
2005 Nov 26
6
Fuzzy searching
Hi, everyone, Just wondering if someone had come up with a good way to do fuzzy searches if you use MySQL as your database (we tried switching to PostgreSQL, but that ended up adding even more problems). Ferret sounds great, but reading through the discussion it looks like we need to solve the problem of write conflicts. I just wrote a post in ruby-talk about using KirbyBase maybe to solve
2005 Oct 28
4
find_by_sql column types
Hello-- There must be a better way to do this. I have a class method in my model that finds averages and does a few calculations using find_by_sql. The problem I¹m encountering is that all computed columns from MySQL come back as type string. E.g., def self.find_averages(domain_id) if @@domain_average return @@domain_average else @@domain_average =
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).
2005 Dec 18
8
Invoking Rails from an API
Hi, I am trying to use ruby int an embedded web server. The environment does not have the luxury of CGI or WebBrick. I find limited documentation on how to get this to work. As a test program on windows, I tried the code in the section below. I have the issues. 1. Is public/dispatch.rb the right script to invoke a rails app? If so, what is the right way to invoke dispatch.rb? 2.
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
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 =>
2005 Dec 15
2
Checking the existance of a NOT NULL constraint from Active Record
Hi, I'd like to check the existance of a NOT NULL constraint for a given attribute using ActiveRecord. Is this possible or do I have to painstakingly query the information_schema myself? I need this for some reflection in a custom association. Thanks, - Rowan -- Morality is usually taught by the immoral. _______________________________________________ Rails mailing list
2009 Nov 12
2
request.session_options broken?
I''m implementing simple "remember me" functionality for logging in users with Rails 2.3.4. I''m trying to set the session expiration date for some time in the future. After googling around a bit I found this post which seems to address my problem: http://squarewheel.pl/posts/3 My modifications to request.session_options are being ignored. According to this discussion (
2006 Mar 15
3
[login_generator] implementing login limits
I have a simple Rails app that I am close to deploying on our intranet. The security model is "either you are an admin or your are not," with the method of implementing this model being done by the login_generator 1.1.0. There is one account set up, ''admin'', with three of us having the ability to logon with this username (i.e. we know the password). I am looking to
2006 Sep 06
1
Problem changing cookie expiration
I''m trying to set the cookie expiration in my environment.rb file but I keep getting a syntax error on WeBRICK startup. I''m trying both of the ways listed in http://wiki.rubyonrails.org/rails/pages/HowtoChangeSessionOptions. FYI I''m new to rails so this is probably easy. 1) ActionController::Base.session_options[:session_expires] = Time.local(2008,"jan"))