# Problem with custom Mime::Type.register

**URL:** <https://www.ruby-forum.com/t/problem-with-custom-mime-type-register/113532>\
**Category:** Rails\
**Created:** [September 1, 2007, 6:59am UTC](https://www.ruby-forum.com/t/problem-with-custom-mime-type-register/113532 "2007-09-01T06:59:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktheory](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Post date:** [September 1, 2007, 6:59am UTC](https://www.ruby-forum.com/t/problem-with-custom-mime-type-register/113532/1 "2007-09-01T06:59:45Z")

</div>

Hello all,

I’m running into a slight problem with Rails and the respond\_to function  
in controllers. I’ve registered a custom Mime::Type of application/x-amf  
:amf (Mime::Type.register “application/x-amf”, :amf). The problem I’m  
having is that the respond\_to function never responds to the  
application/x-amf content-type.

I think I’ve narrowed it down to the  
actionpack/lib/actioncontroller/mime\_responds.rb file. If you look at  
the “custom” and “render” methods (towards the bottom). the method,  
“custom” doesn’t ever put the mime\_type into the @mime\_type\_priority  
array. Which causes the “render” method to never try to “respond\_to” for  
my custom mime type. Does that make sense?

Any help would be greatly appreciated… thanks
