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.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---