You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is causing validations (ie validates_presence_of) against the User model to fail when it's trying to perform the update for the last seen timestamp. Rather than saving here, can this not just make use of update_column so that validations etc aren't triggered?
def stamp!
self.update_column(:last_seen, DateTime.now) if self.last_seen.to_i < (Time.now - 5.minutes).to_i
end
The text was updated successfully, but these errors were encountered:
I know we made a similar update to this a while ago, and it broke due to another change, I believe, in that PR. Unfortunately, I haven't written any ruby code in years, and don't have any reasonable way to test/verify any changes so I'm reluctant to touch this thing.
I know it's not really a great response, but I'd recommend forking and just using your own version of it.
Hey
Just a query ref:
devise_lastseenable/lib/devise_lastseenable/model.rb
Lines 6 to 11 in 2fbfdc4
This is causing validations (ie
validates_presence_of
) against theUser
model to fail when it's trying to perform the update for the last seen timestamp. Rather than saving here, can this not just make use ofupdate_column
so that validations etc aren't triggered?The text was updated successfully, but these errors were encountered: