Comment

Comment by second_brekkie

This is a nice article. I've used Ecto embedded schemas and nimble options separately but never thought to use them together.

Faced with this kind of issue, I'd use Ash with the `Simple` data layer. You can get all the power of an embedded Ecto schema and nimble options together in a single dsl.

If you need to validate with arbitrary logic you can do that with a 'validation'

If you need to transform the input data before you return the struct you can do it in a change set.

It's all there!

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton