philomena/lib/philomena_web/views/profile/award_view.ex

14 lines
259 B
Elixir
Raw Permalink Normal View History

2019-12-15 21:02:13 +01:00
defmodule PhilomenaWeb.Profile.AwardView do
use PhilomenaWeb, :view
def badge_options(badges) do
for badge <- badges do
[
key: badge.title,
value: badge.id,
data: [set_value: badge.description]
]
end
end
end