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

Issue with merging error messages and details #435

Closed
antulik opened this issue Mar 22, 2018 · 2 comments
Closed

Issue with merging error messages and details #435

antulik opened this issue Mar 22, 2018 · 2 comments
Assignees
Labels

Comments

@antulik
Copy link
Contributor

antulik commented Mar 22, 2018

Assume

it 'merges error messages with details' do
  A = Class.new(ActiveInteraction::Base) do
    def execute
      errors.add :base, :details_info, message: 'Custom message'
    end
  end

  B = Class.new(ActiveInteraction::Base) do
    def execute
      compose(A)
    end
  end

  outcome = B.run
  expect(outcome.errors.full_messages).to include('Custom message')
end

# Failure/Error: expect(outcome.errors.full_messages).to include('Custom message')
#       expected ["translation missing: en.active_interaction.errors.models.b.attributes.base.details_info"] to include "Custom message"

When errors are merged and there are details, messages are not merged, which results in missing error messages

@AaronLasseigne AaronLasseigne self-assigned this Mar 28, 2018
@ekluff
Copy link

ekluff commented Dec 18, 2018

Is there any update on this?

@AaronLasseigne
Copy link
Owner

I started to work on fixing this but the second half of 2018 was very busy for me. I'm freeing up some so I'm starting back on fixing this now.

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

3 participants