I want to override the JSON MIME type ("application/json") in Rails to ("text/x-json"). I tried to register the MIME type again in mime_types.rb but that didn't work. Any suggestions?
Thanks.
This should work (in an initializer, plugin, or some similar place):
Mime.send(:remove_const, :JSON)
Mime::Type.register "text/x-json", :json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With