Why does this MIME::Types[‘text/plain’] give ‘text/plaintext/plain’?
The thing is I’m trying to understand how to use mime/types
http://mime-types.rubyforge.org/classes/MIME/Types.html and I can’t
mimic this example:
plaintext = MIME::Types[‘text/plain’]
print plaintext.media_type # => ‘text’
print plaintext.sub_type # => ‘plain’
It doesn’t work unless I do MIME::Types[‘text/plain’].first. Why?