mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-16 09:45:53 -07:00
chore: start adding overview page
This commit is contained in:
parent
1b0af124f7
commit
64b4d599c7
33 changed files with 783 additions and 199 deletions
13
config/initializers/dashboard/array_monkey_patches.rb
Normal file
13
config/initializers/dashboard/array_monkey_patches.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ArrayMonkeyPatches
|
||||
def average
|
||||
sum.to_f / size
|
||||
end
|
||||
|
||||
def remove_blanks
|
||||
reject { |item| item.nil? || item.to_f.nan? || item.zero? }
|
||||
end
|
||||
end
|
||||
|
||||
Array.include ArrayMonkeyPatches
|
||||
Loading…
Add table
Add a link
Reference in a new issue