fix_rounding_of_progress_bar.diff

Bernhard Rohloff, 2019-03-01 18:10

Download (505 Bytes)

View differences:

app/helpers/application_helper.rb (Arbeitskopie)
1330 1330

  
1331 1331
  def progress_bar(pcts, options={})
1332 1332
    pcts = [pcts, pcts] unless pcts.is_a?(Array)
1333
    pcts = pcts.collect(&:round)
1333
    pcts = pcts.collect(&:floor)
1334 1334
    pcts[1] = pcts[1] - pcts[0]
1335 1335
    pcts << (100 - pcts[1] - pcts[0])
1336 1336
    titles = options[:titles].to_a