mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-15 05:38:52 +01:00
Merge pull request #175 from kytrinyx/pie-chart-bug
Add heavy-handed tests against pie chart bug
This commit is contained in:
commit
0cd6656be2
2 changed files with 157 additions and 3 deletions
|
|
@ -350,9 +350,9 @@ class StatsController < ApplicationController
|
|||
|
||||
# explicitely copy contents of hash to avoid ending up with two arrays pointing to same hashes
|
||||
@actions_per_context = Array.new(size){|i| {
|
||||
'name' => all_actions_per_context[i][:name],
|
||||
'total' => all_actions_per_context[i][:total].to_i,
|
||||
'id' => all_actions_per_context[i][:id]
|
||||
'name' => all_actions_per_context[i]['name'],
|
||||
'total' => all_actions_per_context[i]['total'].to_i,
|
||||
'id' => all_actions_per_context[i]['id']
|
||||
} }
|
||||
|
||||
if all_actions_per_context.size > pie_cutoff
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue