similar to: new session in DB for each request

Displaying 20 results from an estimated 40000 matches similar to: "new session in DB for each request"

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 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
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 21
1
db access or @session?
Does it make sense to use the @session to store some values instead of accessing the db on each request? I am trying to optimize the most accessed area, a page that every visitor would access hundreds of times daily. Thanks, Bogdan -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Apr 30
0
Turning off Sessions
That''s the interesting thing that''s what we originally had, and doing some research it seemed that had been replaced with session :off Both produced sessions :( From: "Adam Denenberg" <straightflush@gmail.com> >From: "Adam Denenberg" <straightflush@gmail.com>> >add this >session :disabled => true > the top of the controller
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 Mar 08
3
mod_fcgid first request slow
I have posted this before with not much response so I am posing the question again. Is there a solution for this very apparent issue with mod_fcgid that the "First connection is incredibly slow". It seems its b/c mod_fcgid doesnt keep at least 1 persistent connection around that this first connection needs to start up and then every other request is fast. Is there a solution to this?
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 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 May 29
14
Jabber Powered Rails Chatroom
For those who cant access IRC, or just looking for a quick browser based alternative, i started an open jabber powered webchat for rails. Hopefully this will be a nice alternative for people to go to ask questions, get some help, offer some help, etc. I hope the community enjoys it, just trying to give a little back for all the hard work. It can be accessed here http://jabber.dufftech.com
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
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 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 Jun 20
1
Soliciting suggestions - Form within a Form
Greetings! I could use some suggestions on how to proceed from where I am to where I want to go. I''m working on an app that collects info from the visitor and saves it to a file. The file can later be read in for update. To collect the info, the app presents a form with a set of checkboxes. The state of the checkboxes at initial presentation is controlled by a summary record that is
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 Jan 30
4
How to encode URLs?
How does one encode URLs in ROR? Thanks Frank --------------------------------- Bring words and photos together (easily) with PhotoMail - it''s free and works with Yahoo! Mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060130/60280869/attachment.html
2006 Mar 03
5
Yahoo UI Library with Rails
Has anybody used the Yahoo UI library successfully with rails? I am particulary interested in some of the ratings tools they used (like 4 out of 5 stars thing rating a post). Curious to see if anyone out there has worked with this at all. adam -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jan 09
5
file_column content type
is there a way using the file_column plugin to enforce a certain content type based on regex (i.ie, /^image/) and/or filesize (150k) ? thanks adam
2008 Oct 22
2
setting session id for first visit
I am logging web visits with a before_filter on the application controller. The issue I''m having is that the initial visit does not return a session id. I''m using the SqlSessionStore and the function MysqlSession.find_session(session.session_id) to retrieve the session id. If it doesn''t exist I use a -1. So looking in my visits table the initial visit always has -1 for