Ecto Poly v1.0.4 EctoPoly View Source
Creates a polymorphic embedded type
Link to this section Summary
Functions
Arguments
Link to this section Functions
Arguments
types: Keyword list of{name, type}. Thenameis stored in the database in order to identify whattypeto use in runtime.type_field: Name of the field used to the type of that particular object. Default is:__type__.
Example
defmodule EctoPoly.TestChannelData do
use EctoPoly, types: [
sms: TestSmsChannel,
email: TestEmailChannel,
]
end