Printing out the taxons baby

This commit is contained in:
Will Marshall
2014-04-25 12:56:45 +10:00
parent 776a8db7ae
commit b413acfa2e
3 changed files with 11 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
Darkswarm.filter "printArray", ->
(array, attr = 'name')->
array ?= []
array.map (a)->
a[attr]
.join(", ")

View File

@@ -2,8 +2,7 @@
.columns.small-4
%strong Shop for
%p
Organics, Test data, Food boxes, fruit,
kittens, Meat & Fish, Drinks
{{ hub.taxons | printArray }}
.columns.small-4
%strong Delivery options
%ol

View File

@@ -1,6 +1,10 @@
collection Enterprise.is_distributor
attributes :name, :id
child :taxons do
attributes :name, :id
end
child :address do
attributes :city, :zipcode
node :state do |address|