Skip to content

Instantly share code, notes, and snippets.

@willrjmarshall
Created December 10, 2013 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willrjmarshall/7884307 to your computer and use it in GitHub Desktop.
Save willrjmarshall/7884307 to your computer and use it in GitHub Desktop.
Shop.factory 'OrderCycle', ($resource) ->
class OrderCycle
@order_cycle = {
order_cycle_id: null
}
@set_order_cycle: (id)->
console.log "setting order cycle " + id
new $resource("/shop/order_cycle").save() ->
angular.copy({
order_cycle_id: id
}), @order_cycle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment