Merge pull request #2504 from TracksApp/user_activity

Update last login field when validating existing login. Show 25 users…
This commit is contained in:
Jyri-Petteri Paloposki 2020-10-10 16:33:30 +03:00 committed by GitHub
commit a76b5efcef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ class User < ApplicationRecord
#for will_paginate plugin
cattr_accessor :per_page
@@per_page = 10
@@per_page = 25
has_many(:contexts, -> { order 'position ASC' }, dependent: :delete_all) do
def find_by_params(params)

View file

@ -152,6 +152,7 @@ module LoginSystem
def set_current_user(user)
@user = user
User.update(@user.id, last_login_at: Time.zone.now)
end
# overwrite if you want to have special behavior in case the user is not authorized

View file

@ -21,4 +21,3 @@ class Rack::PathInfoRewriter
end
Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(Tracksapp::Application)