Skip to content

Instantly share code, notes, and snippets.

@deedubs
Created September 22, 2011 14:45
Show Gist options
  • Save deedubs/1234949 to your computer and use it in GitHub Desktop.
Save deedubs/1234949 to your computer and use it in GitHub Desktop.
class MoreableCollection extends RocketCollection
more: (options)->
collection = @
collection.page or= 1
collection.page++
moreUrl = "#{@url}?page=#{collection.page}"
$.getJSON moreUrl, (data) -> collection.add data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment