show transaction distribution in euro's
This commit is contained in:
parent
54b8e8808b
commit
6a86a418eb
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ class Statistics < Rails::Application
|
||||||
end
|
end
|
||||||
|
|
||||||
def amount_distribution
|
def amount_distribution
|
||||||
Transaction.group("round(amount / 10)").count.inject(Hash.new) do |hash, (group, count)|
|
Transaction.group("round(amount / 1000, 2)").count.inject(Hash.new) do |hash, (group, count)|
|
||||||
hash.merge({10 * group.to_i => count})
|
hash.merge({10 * group.to_i => count})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue