Skip to content

Conversation

@fpenapita
Copy link

This commit fix a problem to be able to render error responses for
format distinct to html (for example json) because e.request.format is
returning a Mime::Type object that doesn’t match with the values in
self.class.respond_to that is a hash with keys :html, :json, etc

Using the responders’ verify_requested_format! we are getting exactly
the same goal delegating the tasks in the own responders gem.

This commit fix a problem to be able to render error responses for format distinct to html (for example json) because e.request.format is returning a Mime::Type object that doesn’t match with the values in self.class.respond_to that is a hash with keys :html, :json, etc Using the responders’ verify_requested_format! we are getting exactly the same goal delegating the tasks in the own responders gem.
@coveralls
Copy link

coveralls commented Sep 28, 2020

Pull Request Test Coverage Report for Build 1565

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.8%) to 59.016%

Totals Coverage Status
Change from base Build 1563: -2.8%
Covered Lines: 72
Relevant Lines: 122

💛 - Coveralls
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1565

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-2.8%) to 59.016%

Files with Coverage Reduction New Missed Lines %
lib/exception_handler/config.rb 1 77.78%
Totals Coverage Status
Change from base Build 1563: -2.8%
Covered Lines: 72
Relevant Lines: 122

💛 - Coveralls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants