Sessions from existing database

I want to read the login session data from an existing
Database(oscommerce).

The sessions Table looks like this:
sesskey (varchar(32))
expiry (int(11))
value (text)

I think I have to uncomment this line in the enviroment.rb
config.active_record.schema_format = :sql

But how can I specify the schema of the sessions table?

Can anyone help me please.
thanks in advance

michael

Michael … wrote:

I want to read the login session data from an existing
Database(oscommerce).

The sessions Table looks like this:
sesskey (varchar(32))
expiry (int(11))
value (text)

I think I have to uncomment this line in the enviroment.rb
config.active_record.schema_format = :sql

But how can I specify the schema of the sessions table?

Can anyone help me please.
thanks in advance

michael

did you mean the line “config.action_controller.session_store =
:active_record_store” in environment.rb,

also the following comments are in
actionpack/lib/action_controller/session/active_record_store.rb

# 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’
# CGI::Session::ActiveRecordStore::Session.primary_key =
‘session_id’
# CGI::Session::ActiveRecordStore::Session.data_column_name =
‘legacy_session_data’
# Note that setting the primary key to the session_id frees you from
# having a separate id column if you don’t want it. However, you
must
# set session.model.id = session.session_id by hand! A
before_filter
# on ApplicationController is a good place.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs