rearrange helper functions

This commit is contained in:
hitman 2017-03-10 02:18:26 +05:30 committed by Stella Rouzi
parent bb0857cbad
commit c6203a4ed4
4 changed files with 38 additions and 59 deletions

View file

@ -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