ExTeal.Fields.ManyToMany (ExTeal v0.21.0) View Source

The ManyToMany field corresponds to a many_to_many ecto relationship. For example, let's assume a User schema has a many_to_many relationship with a Role schema. We can add the relationship to our User resource like so:

alias ExTeal.Fields.ManyToMany

ManyToMany.make(:roles)

Link to this section Summary

Link to this section Functions

Link to this function

apply_options_for(field, model, conn, type)

View Source

Callback implementation for ExTeal.Field.apply_options_for/4.

Callback implementation for ExTeal.Field.default_sortable/0.

Callback implementation for ExTeal.Field.filterable_as/0.

Link to this function

make(name, label \\ nil)

View Source

Callback implementation for ExTeal.Field.make/2.

Link to this function

make(relationship_name, module, label \\ nil)

View Source

Callback implementation for ExTeal.Field.sanitize_as/0.

Link to this function

sortable_by(field, pivot_field_name)

View Source
Link to this function

value_for(field, model, method)

View Source

Callback implementation for ExTeal.Field.value_for/3.

Link to this function

with_pivot_fields(field, pivot_fields)

View Source