Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for nested changeset error handling. #5

Merged
merged 4 commits into from
Apr 16, 2019

Conversation

ademirovic
Copy link

@ademirovic ademirovic commented Apr 2, 2019

Changes

  • Support for nested changeset error handling. When first element in errors list is a map, we have encountered nesting.
  • Support for suberrors. Previously when suberrors happend, poison would throw Poison.EncodeError because suberrors were a keyword list.
  • Tests for nested changeset. Examples of tests were written according to problems I currently encountered in my application.

Copy link
Contributor

@space-measurer space-measurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Great job!

lib/formatters/ecto/changeset.ex Outdated Show resolved Hide resolved
lib/formatters/ecto/changeset.ex Outdated Show resolved Hide resolved
test/formatters/ecto/changeset_test.exs Show resolved Hide resolved
Copy link
Contributor

@pozhega pozhega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job. Few style comments and suggestions left though. :)

@pozhega pozhega merged commit a002ae9 into master Apr 16, 2019
@ademirovic ademirovic deleted the feature/nested_changesets branch April 17, 2019 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants