Hi,
I'm having trouble deleting from active record store.
I want to delete based on the session data:
ActiveRecord::SessionStore::Session.find(:all).each do |s|
if s.data[:userid] == 1234
s.destroy
end
end
does not seem to work, but:
ActiveRecord::SessionStore::Session.delete_all(["updated_at < ?", 12.hours.ago])
seems to work and:
ActiveRecord::SessionStore::Session.find(:all).each do |s|
if s.data[:userid] == 1234
ActiveRecord::SessionStore::Session.delete_all("session_id = ?", s.session_id)
end
end
also doesnt work.
I'm running version rails 2.3.2, ruby 1.8.7.