Skip to content

Instantly share code, notes, and snippets.

@Killavus
Created July 17, 2014 20:08
Show Gist options
  • Save Killavus/f7797e4cb0e14926e9c8 to your computer and use it in GitHub Desktop.
Save Killavus/f7797e4cb0e14926e9c8 to your computer and use it in GitHub Desktop.
Example of Backend class for photos displaying problem
class Photos.Backend
fetchPhotos: =>
request = $.ajax(
url: '/photos'
type: 'GET'
contentType: 'application/json'
)
.then (response) =>
photos = []
for photo in response.photos
photos.append(Photos.Photo.fromJSON(photo))
photos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment