mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 07:26:22 +02:00
Fixed chart data serialization
This commit is contained in:
parent
e70be801c2
commit
7c84949fcb
1 changed files with 3 additions and 3 deletions
|
@ -111,7 +111,7 @@ module Repp
|
||||||
def registrar_names
|
def registrar_names
|
||||||
@registrar_names ||= ::Registrar.where(test_registrar: false)
|
@registrar_names ||= ::Registrar.where(test_registrar: false)
|
||||||
.map { |r| { "#{r.id}": r.name }.with_indifferent_access }
|
.map { |r| { "#{r.id}": r.name }.with_indifferent_access }
|
||||||
.inject(:merge)
|
.reduce({}, :merge)
|
||||||
end
|
end
|
||||||
|
|
||||||
def serialize_distribution_result(result)
|
def serialize_distribution_result(result)
|
||||||
|
@ -122,7 +122,7 @@ module Repp
|
||||||
hash = { name: name, y: value }
|
hash = { name: name, y: value }
|
||||||
hash.merge!({ sliced: true, selected: true }) if current_user.registrar.name == name
|
hash.merge!({ sliced: true, selected: true }) if current_user.registrar.name == name
|
||||||
hash
|
hash
|
||||||
end
|
end.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
def serialize_growth_rate_result(result)
|
def serialize_growth_rate_result(result)
|
||||||
|
@ -131,7 +131,7 @@ module Repp
|
||||||
|
|
||||||
name = registrar_names[key]
|
name = registrar_names[key]
|
||||||
[name, value]
|
[name, value]
|
||||||
end
|
end.compact
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue