diff options
| author | mo khan <mo@mokhan.ca> | 2014-06-29 08:12:37 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-06-29 08:12:37 -0600 |
| commit | ea7d541784ecf43c8afbe604fb5ae8874d7c8ca9 (patch) | |
| tree | daae80e2bdf5c498f93395715718c951c1b59565 /app/assets/javascripts/backbone/models | |
| parent | 2495bb02e9af98a08f0b69ba4b765956d194a245 (diff) | |
re-render thumbnail when photo model synced and create cache for photo collections.
Diffstat (limited to 'app/assets/javascripts/backbone/models')
| -rw-r--r-- | app/assets/javascripts/backbone/models/photo.js.coffee | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/backbone/models/photo.js.coffee b/app/assets/javascripts/backbone/models/photo.js.coffee index 23bde850..26573d57 100644 --- a/app/assets/javascripts/backbone/models/photo.js.coffee +++ b/app/assets/javascripts/backbone/models/photo.js.coffee @@ -4,6 +4,7 @@ class CakeSide.Models.Photo extends Backbone.Model defaults: id: null + cake_id: null content_type: null original_filename: null thumb_url: null @@ -16,4 +17,5 @@ class CakeSide.Collections.PhotosCollection extends Backbone.Collection model: CakeSide.Models.Photo initialize: (options) -> + @set('cake_id', options.cake_id) @url="/api/v1/cakes/#{options.cake_id}/photos" |
