better piechart of origins
This commit is contained in:
parent
6a86a418eb
commit
d0d7510532
1 changed files with 3 additions and 3 deletions
|
@ -18,9 +18,9 @@ class Statistics < Rails::Application
|
||||||
end
|
end
|
||||||
|
|
||||||
def by_issuer
|
def by_issuer
|
||||||
Transaction.group(:issuer_id).count.inject(Hash.new) do |hash, (id, count)|
|
Client.joins(:issued_transactions).group(:name).count.merge({
|
||||||
hash.merge({User.find(id).name => count})
|
"User created" => Transaction.where(issuer_type: "User").count
|
||||||
end
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
def amount_distribution
|
def amount_distribution
|
||||||
|
|
Loading…
Reference in a new issue