halostatue/mime-types — Issue #10: Online documentation has lame interpolation failures
Author: twhaples
Created: 2012-02-14 00:36:18+00:00
State: open

At http://mime-types.rubyforge.org/MIME/Types.html#method-i-type_for there is sample code which looks like

```
puts "MIME::Types.type_for('citydesk.xml')
=> "#{MIME::Types.type_for('citydesk.xml')}"
puts "MIME::Types.type_for('citydesk.gif')
=> "#{MIME::Types.type_for('citydesk.gif')}"
```

Seriously? It's supposed to output a bunch of junk with a ```#{}``` around it? I don't think so.
Unfortunately, because the real sample output was missing when I looked, I assumed it would return a single type and tried to send something from Rails with ```:content_type => MIME::Types.type_for('foo.css')``` which sent the deceptively-good-looking string ```[text/css]``` instead of sending ```text/css```. I subsequently wasted a bunch of time tracking down what the problem was.