diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-21 11:36:10 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-21 12:04:12 -0700 |
commit | efc6dd550ee49e7e443f9d72785caa0f240def53 (patch) | |
tree | 40ded45158d63402e05c69178ca8f4f4c4833041 /.yardopts | |
parent | ad1d0b8408f08bc08d54adfd66040bea14b44fe4 (diff) | |
download | rails-efc6dd550ee49e7e443f9d72785caa0f240def53.tar.gz rails-efc6dd550ee49e7e443f9d72785caa0f240def53.tar.bz2 rails-efc6dd550ee49e7e443f9d72785caa0f240def53.zip |
deprecate accessing mime types via constants
We don't want to manage a list of constants on `Mime::`. Managing
constants is strange because it will break method caches, not to mention
looking up by a constant could cause troubles. For example suppose
there is a top level constant `HTML`, but nobody registers the HTML mime
type and someone accesses `Mime::HTML`. Instead of getting an error
about how the mime type doesn't exist, instead you'll get the top level
constant.
So, instead of directly accessing the constants, change this:
Mime::HTML
To this:
Mime::Type[:HTML]
Diffstat (limited to '.yardopts')
0 files changed, 0 insertions, 0 deletions