json.cache_root! [Log.all, @logs] 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