Created
December 11, 2013 01:15
-
-
Save willrjmarshall/7903501 to your computer and use it in GitHub Desktop.
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
Shop.factory 'Product', ($resource) -> | |
new class Product | |
@products: null | |
update: -> | |
@products = $resource("/shop/products").query() | |
all: -> | |
@products || @update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment