diff options
| author | mo <mo.khan@gmail.com> | 2017-09-24 18:06:07 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2017-09-24 18:06:07 -0600 |
| commit | c7ee6fd5562231619169918d8bd75093a01218d1 (patch) | |
| tree | b29c8bbae66a3c554c0b48516fd344a10b72a42d /app/views/application/json | |
| parent | 576a045848457252df3b96e1bd66532d5c86b382 (diff) | |
load tutorials collection on the page.
Diffstat (limited to 'app/views/application/json')
| -rw-r--r-- | app/views/application/json/_tutorials.jbuilder | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/application/json/_tutorials.jbuilder b/app/views/application/json/_tutorials.jbuilder new file mode 100644 index 00000000..2c7f7692 --- /dev/null +++ b/app/views/application/json/_tutorials.jbuilder @@ -0,0 +1,16 @@ +json.cache! items do + json.array! items do |tutorial| + json.id tutorial.id + json.heading tutorial.heading + json.description tutorial.description + json.url tutorial.url + json.image_url tutorial.image_url + json.author tutorial.author + json.author_url tutorial.author_url + json.created_at tutorial.created_at + json.updated_at tutorial.updated_at + json.tags tutorial.tags do |tag| + json.name tag.name + end + end +end |
