Bharath Neo wrote in post #1154181:
> Hi,
> I have been asking this question in multiple forums like stackexchange
> but have not received a solution or proper help. Any help here is
> appreciated.
>
> I have a rails app with a session store database (mysql). When I want to
> clear a session, I reset the session variables and call reset_session.
> But then the record in mysql which was added on creating a session does
> not get cleared automatically (which it should).

Do you have reference to documentation stating that it should? To my 
knowledge using ActiveRecord session storage has always required manual 
purging.

This article might help:
http://blog.brightbox.co.uk/posts/clearing-out-rails-sessions

Besides using MySQL for session storage isn't currently recommended in 
the first place:

http://guides.rubyonrails.org/4_0_release_notes.html
---------------
ActiveRecord session store (commit) - The ActiveRecord session store is 
extracted to a separate gem. Storing sessions in SQL is costly. Instead, 
use cookie sessions, memcache sessions, or a custom session store.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/0ac6f765e11e9ae7b9482f6283af234b%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to