rearrange helper functions
This commit is contained in:
parent
bb0857cbad
commit
c6203a4ed4
4 changed files with 38 additions and 59 deletions
|
|
@ -195,12 +195,5 @@ module FormatHelper
|
|||
def quantity_left_of(resource)
|
||||
return '-/-' if resource.quantity.blank?
|
||||
"#{resource.quantity - resource.used}/#{resource.quantity}"
|
||||
|
||||
def normalize_array_length(hashmap, length)
|
||||
hashmap.each do |_, value|
|
||||
if value.length < length
|
||||
value.fill(value[-1], value.length...length)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue