mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-10 03:08:50 +01:00
Merge branch 'master' into new-gui
This commit is contained in:
commit
41ff0e20ae
2 changed files with 23 additions and 1 deletions
|
|
@ -377,7 +377,7 @@ class StatsController < ApplicationController
|
|||
# the block should return an array of indexes each is added to the hash and summed
|
||||
def convert_to_array(records, upper_bound)
|
||||
a = Array.new(upper_bound, 0)
|
||||
records.each { |r| (yield r).each { |i| a[i] += 1 } }
|
||||
records.each { |r| (yield r).each { |i| a[i] += 1 if a[i] } }
|
||||
a
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue