I want to create a simple one-line function (to be used by a
before_filter) that expires the session[:updated_at] data after twenty
To be honest, if I knew Ruby a little more I wouldn’t be asking this
question, but exactly how does the addition and the subtraction of
Time work in Rails? Are they treated as time variables, or integer
variables of some form?
Would something like this work?
session[:updated_at]=nil if Time.now-session[:updated_at]<20.minutes