| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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? -- Posted via http://www.ruby-forum.com/. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.