similar to: Switching to active_record_store session management errors out

Displaying 20 results from an estimated 2000 matches similar to: "Switching to active_record_store session management errors out"

2008 Mar 14
15
Is anyone running Rails 2.x against a MS SQL Server DB?
I am unable to get ActiveRecord session support to work under 2.x against a SQL Server database. I''m starting to wonder if anyone is running 2.x against SQL Server? Is anyone running under the following configuration: Rails 2.x SQL Server 2000 DB (using AR adapter in ODBC mode) AR store for ActionController session store. I''d like to chat with you if you are. Thanks, Wes --
2008 May 21
2
Replacing ActiveRecordStore::Session with a custom model
Has anyone managed to replace ActiveRecordStore::Session with their own model? In the source (http://dev.rubyonrails.org/browser/trunk/actionpack/lib/ action_controller/session/active_record_store.rb) it says you can override the default by setting CGI::Session::ActiveRecordStore.session_class = MySessionClass I have tried doing this in a number of ways but I get all kinds of weird errors, as
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
2007 Jun 08
0
problem with rake db:sessions:clear and session_table_name
The comments in: actionpack/lib/action_controller/session/activerecord_store.rb document this method for changing the session table_name: # You may configure the table name, primary key, and data column. # For example, at the end of config/environment.rb: # CGI::Session::ActiveRecordStore::Session.table_name = ''legacy_session_table'' #
2006 May 05
5
Sessid.
How can I get the sessid from the current session object? For instance, I log in the system, and want to know which sessid I''m using. I''m storing the session using active_record. Later on, I want to restore a session finding it using the sessid. Thanks in advance. Fernando Lujan
2009 Feb 19
1
Switching to ActiveRecord Session Store
I''m having a problem switching from cookie sessions (the default) to active record sessions. I''ve created the sessions table via the rake task, uncommented the line config.action_controller.session_store = :active_record_store in my environment.rb file, cleared out my browsers cookies, restarted the server (natch), but still the it''s using cookie_store instead of
2006 Dec 01
2
ActiveRecord Sessions
I am considering using merb to process file uploads. For the most part I''m going to keep it lean and mean. I would however like to access my active_record_session from my Rails app. Is this built into merb yet? Or is it OK to just add require ''action_controller/session/ active_record_store'' to merb_init.rb and then create my own session object
2005 Aug 06
2
Problem with 0.13.1 ActiveRecordStore with PG 8.0.3.
Hi, I put the following in my environment.rb file: ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update (:database_manager => CGI::Session::ActiveRecordStore) Runnning WEBrick via "script/server" and trying to load any page served by a controller results in an error like the following: #<ActiveRecord::StatementInvalid: ERROR: null value in column "id"
2010 Jul 07
1
what is a session stored via the active_record_store option unique to?
Hi, After a bunch of snooping in AWDWR and Railsguides I can''t reach a good understanding to the following question: What is a session stored via the active_record_store option unique to? In other words, how does rails bind the user to their session under the active_record_store option? This concern has arisen in the following way... ...I have two use levels in my app: 1) authenticated
2009 Apr 20
11
manual access to session data outside of request?
So, given a sessionID, I have need to read and write the session stored information ''manually'', from _outside_ an actual Rails request/controller. Readers, I know your first response may be to tell me I don''t really want to do that. Trust me though, I really do, it makes sense for me in my case. I know this wouldn''t work if you''re using the new cookie
2008 Feb 12
4
Syntax of session's updated_at field ?
What''s the syntax to acquire the updated_at value of a session stored in a db? session.updated_at doesn''t work. can''t find any docs on this. -- gw --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Jul 29
3
Engines question
I would like to get at all models in a rails application to be able to add a field to every one of them as part of a migration. Something like the following: Appmodels.each { |x| add_column x.table_name.to_s, :foo, :text } I understand I can get the table name using ActiveRecord::Base#table_name, but how do I get all the models into an array that I can use in the above manner? -- Cheers, Hasan
2006 Aug 08
11
Newb question- method not working
I know this shouldn''t be in the view but to test the code it is. Anyway if I do just session[user] I get back the user id (the id from the user table) which is good. However this code does not work. <% a = session[:user] %> <% uname = User.find(:first, :conditions => id = a) %> <%= @uname %> TIA Stuart
2010 Nov 29
3
session active_record_store
Hi, There doesn''t seem to be any previous posts about this problem, I must be setting things up wrongly at very basics... Firstly, the problem... I can''t get session[] to persist with active_record_store. I enabled (config.action_controller.session_store = :active_record_store) in environment.rb and created the sessions table at my MySQL database. When I do a session[:blah] =
2009 Jun 19
1
config.action_controller.session_store = :active_record_store
Hi All, I am new to Rails and learning rails reading ebook ''Agile web development using rails''. I am doing samples given in this book chapter by chapter. but I stuck when I come to Sessions chapter, they have given that to enable session to be Database based the line config.action_controller.session_store = :active_record_store is to be uncommented from config/environment.rb
2006 Mar 15
2
Session (stored in db) not working in testing mode
Hi, I just switched from storing my sessions on disk to storing them in MySQL. Changing environment.rb ''config.action_controller.session_store = :active_record_store''. But now all my tests fail. I get the following error: 1) Failure: test_authorized_new(AdControllerTest) [c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/depr
2007 Oct 03
2
active_record_store sessions does not pass a :secret to #protect_from_forgery in Rails 2.0.0 Preview
After switching to active_record_store to host sessions, I now get the following errors: ActionController::InvalidAuthenticityToken in Pages#edit Showing app/views/pages/edit.html.erb where line #5 raised: No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store). Extracted source (around line #5): 2: 3:
2009 Oct 17
3
Security problems with CookieStore and CSRF protection
Dear Rails community, As part of a programming languages/security research group at the University of Maryland, we are building some static analysis tools for Rails applications. These tools work by taking formally specified properties of interest, and then analyzing code to verify that those properties indeed hold. Using these tools, we found some security vulnerabilities in Rails, and we would
2006 May 29
4
session not persisting
I set up session to save to the db and everytime I hit a page I get a new session entry created. Some of them have session_ids of more than 5 digits, but lots of them have session_ids like 0. Something is amiss. -- Posted via http://www.ruby-forum.com/.
2008 Jan 04
2
oracle adapter + activerecord sessions do not work
Anyone know what''s up with the activerecord session store when using the oracle adapter in Rails 2.0.2 ? I can set a session variable and can then see it''s actually set using the debugger, but after the request completes the session is empty (the @data member is nil). The session_id is staying the same and the updated_at field is being updated but nothing I put in a session