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

Use verify_request_format! method to check valid request format #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants