Commit 4454bd91
Changed files (2)
app
views
api
v2
tutorials
app/views/api/v2/tutorials/_tutorial.json.jbuilder
@@ -0,0 +1,7 @@
+json.cache! ['v2', tutorial] do
+ json.heading tutorial.heading
+ json.description tutorial.description
+ json.url tutorial.url
+ json.image_url tutorial.image_url
+ json.submitter tutorial.user.id
+end
app/views/api/v2/tutorials/index.json.jbuilder
@@ -1,7 +1,3 @@
json.tutorials @tutorials do |tutorial|
- json.heading tutorial.heading
- json.description tutorial.description
- json.url tutorial.url
- json.image_url tutorial.image_url
- json.submitter tutorial.user.id
+ json.partial! tutorial, tutorial: tutorial
end