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

errors.merge! inception #417

Closed
adriano-tirloni opened this issue Jun 6, 2017 · 1 comment
Closed

errors.merge! inception #417

adriano-tirloni opened this issue Jun 6, 2017 · 1 comment
Assignees
Labels

Comments

@adriano-tirloni
Copy link

Hello, I don't know if this is the expected behaviour or not but this is the situation:

I have 2 interactions, the inner one with:
errors.add(:base, :blank)
the outer one with:

errors.add(:base, :wrong_number)
errors.merge!(inner_output.errors)

If I call the errors for the outer:
outer_output.errors.details
I will get this hash:
{:base=>[{:error=>:wrong_number}, {:error=>"cannot be blank"}]}
meaning its merging the translated message and not the symbol from the inner interaction.

Is this how its supposed to be?

@AaronLasseigne
Copy link
Owner

AaronLasseigne commented Jun 9, 2017

This has been fixed and released as 3.5.2. Thanks for reporting it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants