# Mime::Type.register documentation needs example

**URL:** <https://www.ruby-forum.com/t/mime-type-register-documentation-needs-example/165515>\
**Category:** Rails\
**Created:** [April 14, 2009, 6:38pm UTC](https://www.ruby-forum.com/t/mime-type-register-documentation-needs-example/165515 "2009-04-14T18:38:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sudhir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3ab097/32.png) [@Sudhir](https://www.ruby-forum.com/u/Sudhir)\
**Post date:** [April 14, 2009, 6:38pm UTC](https://www.ruby-forum.com/t/mime-type-register-documentation-needs-example/165515/1 "2009-04-14T18:38:26Z")

</div>

# $RAILS\_ROOT/config/mime\_types.rb

Mime::Type.register “image/jpg”, :jpg, [“image/jpeg”, “image/pjpeg”]

Above example uses mime type synonyms. Each synonym is a alternative  
string used to identify the same mime type and appears as an array  
after the mime type symbol.

The class document does not explain the meaning of mime\_type\_synonyms  
nor give an example. Someone should fix that.

Hope this post clarifies use of mime type synonyms.
