Hi,
Rather than accessing a base methods directly, you can access some
class methods like 'process_cgi' to solve you pbm better I think. Try
http://api.rubyonrails.org/classes/ActionController/Base.html#M000523
this one and post here whether it helps you or not. I am also
interested in knowing this.
Thanks,
Sadeesh
On Dec 15, 4:41 pm, Jeff Vogt <[email protected]>
wrote:
> Hi, first post here. I'm enjoying getting to know rails. I have been
> scratching my head trying to find a way to modify data in a session by
> directly accessing CGI::Session.
>
> I should note, using the following code, I can successfully create a new
> key / value pair from the console, but not within my app. I have tried
> both methods below:
>
> def add_session_data(other_sess_id, new_data)
> a =
> CGI::Session::ActiveRecordStore::Session.find_by_session_id(other_sess_id)
> a.data[:test] = new_data
> a.save
> end
>
> def add_session_data(other_sess_id, new_data)
> cgi = CGI.new("html4")
> a = CGI::Session.new(cgi, 'database_manager' =>
> CGI::Session::ActiveRecordStore, 'session_id' => other_sess_id)
> a[:test] = new_data
> a.close
> end
> --
> Posted viahttp://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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---