Created
July 17, 2014 20:08
-
-
Save Killavus/f7797e4cb0e14926e9c8 to your computer and use it in GitHub Desktop.
Example of Backend class for photos displaying problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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