master
 1json.cache! ['v1', cake] do
 2  json.id cake.id
 3  json.name cake.name
 4  json.slug cake.to_param
 5  json.story cake.story
 6  json.created_at cake.created_at
 7  json.updated_at cake.updated_at
 8  json.category do
 9    json.id cake.category.id
10    json.name cake.category.name
11  end
12  json.user do
13    json.id cake.user.id
14    json.name cake.user.name
15  end
16  json.photos cake.photos do |photo|
17    json.id photo.id
18    json.large_url "https:#{photo.url_for(:large)}"
19    json.thumb_url "https:#{photo.url_for(:thumb)}"
20    json.created_at photo.created_at
21    json.updated_at photo.updated_at
22  end
23  json.tags cake.tags do |tag|
24    json.name tag.name
25  end
26end