Module: Card::Set::Self::All::ClassMethods

Defined in:
tmpsets/set/mod007-05_standard/self/all.rb

Instance Method Summary collapse

Instance Method Details

#delete_old_sessionsObject



25
26
27
28
29
30
# File 'tmpsets/set/mod007-05_standard/self/all.rb', line 25

def delete_old_sessions
  return unless (months = Env.params[:months].to_i) && months > 0
  ActiveRecord::SessionStore::Session.delete_all(
    ['updated_at < ?', months.months.ago]
  )
end