Use media_type instead of content_type
Use media_type instead of content_type

Rails 6.0.0.rc2 changed the behaviour of the `content_type` method to
include the `charset` media type parameter. This broke our content type
check, which assumed no parameters would be present. A new `media_type`
method was also added that returns the media type without parameters.

We can fix the content type check on Rails 6.0 while staying compatible
with older Rails versions by using the `media_type` method if it exists,
and falling back to the `content_type` method otherwise.

intercom/intercom-rails,intercom/intercom-rails