parsley/app/views/logs/index.json.jbuilder

16 lines
328 B
Ruby

json.cache_root!(@logs, version: @logs.cache_version) do
json.extract! @logs, :total_count, :total_pages, :current_page
json.page_size @logs.limit_value
json.logs @logs do |l|
json.extract! l, :id, :date, :rating, :notes
json.recipe do
json.id l.recipe.id
json.name l.recipe.name
end
end
end