Add date_range
view helper (#32187)
This commit is contained in:
parent
7a653001b4
commit
f251edfc1d
4 changed files with 8 additions and 9 deletions
|
@ -18,6 +18,11 @@ module Admin::DashboardHelper
|
|||
end
|
||||
end
|
||||
|
||||
def date_range(range)
|
||||
[l(range.first), l(range.last)]
|
||||
.join(' - ')
|
||||
end
|
||||
|
||||
def relevant_account_timestamp(account)
|
||||
timestamp, exact = if account.user_current_sign_in_at && account.user_current_sign_in_at < 24.hours.ago
|
||||
[account.user_current_sign_in_at, true]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue