Skip to content

Instantly share code, notes, and snippets.

@johnfoconnor
Created August 12, 2014 18:21
Show Gist options
  • Save johnfoconnor/06c9abc098a864aa6081 to your computer and use it in GitHub Desktop.
Save johnfoconnor/06c9abc098a864aa6081 to your computer and use it in GitHub Desktop.
my_app.complex_list = {buzz, person}, {fido, dog}
[mappings: [
"my_app.complex_list": [
to: "my_app.complex_list",
datatype: [list: :opaque],
default: []
]
],
translations: [
"my_app.complex_list": fn
_, values, conf_acc ->
Enum.map(values, fn({name, type}) ->
[name: name,
type: type]
end)
end
]]
[{my_app,
complex_list, [
[{name, buzz},
{type, person}],
[{name, fido},
{type, dog}]
]}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment