CGI::Session::ActiveRecordStore::Session.find_by_session_id(id)
In Rails 2.3, this doesn't work any more and you are presented an error of the form:
uninitialized constant CGI::Session
To fix this, I found this post, which notes to use
ActionController::Session.find_by_session_id(id)
instead. However, per the Rails API docs, that only works for CookieStore, AbstractStore, and MemCacheStore. If you are using ActiveRecord for your stores like I am, this syntax instead is:
ActiveRecord::SessionStore::Session.find_by_session_id(id)
No comments:
Post a Comment