From 0a40d930732ee933c9bd6acd5aca21cae8e26717 Mon Sep 17 00:00:00 2001 From: mo Date: Sat, 7 Oct 2017 15:33:33 -0600 Subject: load all collections using backbone_collection_for helper. --- app/views/application/json/_photos.jbuilder | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/views/application/json/_photos.jbuilder (limited to 'app/views/application') diff --git a/app/views/application/json/_photos.jbuilder b/app/views/application/json/_photos.jbuilder new file mode 100644 index 00000000..f7b6be48 --- /dev/null +++ b/app/views/application/json/_photos.jbuilder @@ -0,0 +1,13 @@ +json.array! @photos do |photo| + json.cache! ['v1', photo] do + json.id photo.id + json.cake_id photo.imageable_id + json.content_type photo.content_type + json.original_filename photo.original_filename + json.thumb_url photo.url_for(:thumb) + json.large_url photo.url_for(:large) + json.original_url photo.url_for(:original) + json.created_at photo.created_at + json.updated_at photo.updated_at + end +end -- cgit v1.2.3