rearrange helper functions
This commit is contained in:
parent
f63259f187
commit
5b1a730e19
5 changed files with 30 additions and 71 deletions
|
|
@ -192,11 +192,8 @@ module FormatHelper
|
|||
markdown("#{text} Please look at #{link_to '**Markdown Syntax**', 'https://daringfireball.net/projects/markdown/syntax', target: '_blank'} to format your text")
|
||||
end
|
||||
|
||||
def normalize_array_length(hashmap, length)
|
||||
hashmap.each do |_, value|
|
||||
if value.length < length
|
||||
value.fill(value[-1], value.length...length)
|
||||
end
|
||||
end
|
||||
def quantity_left_of(resource)
|
||||
return '-/-' if resource.quantity.blank?
|
||||
"#{resource.quantity - resource.used}/#{resource.quantity}"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue