mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 19:05:32 -04:00
Formatting
This commit is contained in:
parent
9c07944390
commit
293fb84e1d
@ -139,7 +139,8 @@ class Library
|
|||||||
titles.flat_map &.deep_entries
|
titles.flat_map &.deep_entries
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_json(*, slim = false, depth = -1, sort_context = nil, percentage = false)
|
def build_json(*, slim = false, depth = -1, sort_context = nil,
|
||||||
|
percentage = false)
|
||||||
_titles = if sort_context
|
_titles = if sort_context
|
||||||
sorted_titles sort_context[:username],
|
sorted_titles sort_context[:username],
|
||||||
sort_context[:opt]
|
sort_context[:opt]
|
||||||
|
@ -256,8 +256,11 @@ class Title
|
|||||||
end
|
end
|
||||||
json.field "entry_percentages" do
|
json.field "entry_percentages" do
|
||||||
json.array do
|
json.array do
|
||||||
load_percentage_for_all_entries(sort_context[:username], sort_context[:opt]).each do |percentage|
|
load_percentage_for_all_entries(
|
||||||
json.number percentage.nan? ? 0 : percentage
|
sort_context[:username],
|
||||||
|
sort_context[:opt]
|
||||||
|
).each do |p|
|
||||||
|
json.number p.nan? ? 0 : p
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user