mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-17 09:46:25 -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
21
config/initializers/dashboard/float_monkey_patches.rb
Normal file
21
config/initializers/dashboard/float_monkey_patches.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module FloatMonkeyPatches
|
||||
def round_up_to_one
|
||||
if positive? && self < 1
|
||||
1.0
|
||||
else
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
def round_down_to_five
|
||||
if positive? && self > 5
|
||||
5.0
|
||||
else
|
||||
self
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Float.include FloatMonkeyPatches
|
||||
Loading…
Add table
Add a link
Reference in a new issue