wusher
wusher

Reputation: 12441

Ecto Model Serialize

It there a method that Ecto.Entity or Ecto.Model provides that will return a Dict of the fields defined in the model and their values?

Upvotes: 1

Views: 426

Answers (1)

José Valim
José Valim

Reputation: 51339

Yes, to_keywords (it is the same function used by records).

Upvotes: 2

Related Questions