Reworking the RABL templates for simplicity AND fixing up all the tests

This commit is contained in:
Will Marshall
2014-06-18 13:05:44 +10:00
parent b7e19ca290
commit c8384f1a71
15 changed files with 146 additions and 87 deletions

View File

@@ -0,0 +1,5 @@
Darkswarm.factory 'Enterprises', (enterprises)->
new class Enterprises
constructor: ->
@enterprises = enterprises
@dereference()

View File

@@ -1,4 +1,4 @@
Darkswarm.factory 'Hubs', ($location, hubs, $filter, CurrentHub) ->
Darkswarm.factory 'Hubs', (hubs, $filter) ->
new class Hubs
constructor: ->
@hubs = $filter('orderBy')(hubs, ['-active', '+orders_close_at'])

View File

@@ -2,11 +2,4 @@ Darkswarm.factory 'Producers', (producers) ->
new class Producers
constructor: ->
@producers = producers
# TODO: start adding functionality to producers like so
#@producers = (@extend(producer) for producer in producers)
#extend: (producer)->
#new class Producer
#constructor: ->
#@[k] = v for k, v of Producer