Sort recipes by name

This commit is contained in:
Nicholas Kariniemi 2014-11-24 16:26:34 +02:00
parent c910d1d1f8
commit 414dceec8b

View file

@ -23,7 +23,9 @@
[:h3.recipes-title "Recipes"]
(om/build recipe-new/view {} {:opts {:add-recipe-ch add-recipe-ch}})
[:ul#recipe-list.list-group.recipe-list
(for [recipe (vals recipes)]
(for [recipe (->> recipes
vals
(sort-by #(.toLowerCase (:name %))))]
(om/build recipe/view
recipe
{:key :id :opts {:remove-recipe-ch remove-recipe-ch}}))]]))