Created
May 3, 2015 22:35
-
-
Save scrogson/312719927c7d0b008068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def event_map do | |
Enum.reduce Repo.all(Event), %{}, fn event, acc -> | |
Map.put(acc, event.id, event.name) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment