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

Don't clobber the JSON MIME type. #22

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

Commits on Dec 12, 2014

  1. Don't clobber the JSON MIME type.

    simple_datatables was preventing Rails from parsing POST messages with a JSON
    body.  The reason was that Mime::Type.register will associate a symbol with a
    mime type for both content generation (outbound HTTP responses, for instance)
    and content parsing (inbound HTTP requests), so when the middleware retrieved
    the identifying symbol associated with the application/json datatype, it got
    back :datatables, which it ignored. Mime::Type.register_alias will associate
    the symbol with the mime type for content generation only, so parsing the JSON
    body into a parameters array still works.
    meadmaker committed Dec 12, 2014
    Configuration menu
    Copy the full SHA
    83fee41 View commit details
    Browse the repository at this point in the history