Show More
Commit Description:
(in progress) add date range
Commit Description:
(in progress) add date range
References:
File last commit:
Show/Diff file:
Action:
app/controllers/report_controller.rb | 18 lines | 637 B | text/x-ruby | RubyLexer |
add login stat
r410 class ReportController < ApplicationController
def login_stat
@logins = Array.new
login = Login.all
(in progress) add date range
r412
date_and_time = '%y-%m-%d %H:%M'
since_time = strptime(params[:since_datetime],date_and_time)
until_time = strptime(params[:until_datetime],date_and_time)
add login stat
r410 User.all.each do |user|
@logins << { login: user.login,
full_name: user.full_name,
count: Login.where(user_id: user.id).count(:id),
min: Login.where(user_id: user.id).maximum(:created_at),
max: Login.where(user_id: user.id).minimum(:created_at) }
end
end
end