   Organization::toData = ->
     name: @name
   Organization
+]
    get: -> @_fqn ?= if @parent then @parent.fqn + ' > ' + @name else @name
  # console.log Category, Category.prototype, Category.identityMap
  Category


@APP.factory "User", ["$resource", "Organization",
($resource, Organization) ->
  User = $resource "/users/:id", {},
    query:  method: "GET", isArray: true

@APP.factory "Category", [ "$resource",
($resource) ->
  Category = $resource "/categories/:id", {},
    query:  method: "GET", isArray: true
    update: method: "PUT"
