diff options
author | Matthew Draper <matthew@trebex.net> | 2015-12-06 04:59:09 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2015-12-06 05:10:49 +1030 |
commit | 0d8b3c2e7fba5f1d35c3cbc09797311a0be1b480 (patch) | |
tree | d496a43f018b9725c3e53f7cf83d8904b7f75c6c /actionpack/lib/action_dispatch | |
parent | c5e5b94c8afe83fb2d2a1a353bdbd1808c232e79 (diff) | |
download | rails-0d8b3c2e7fba5f1d35c3cbc09797311a0be1b480.tar.gz rails-0d8b3c2e7fba5f1d35c3cbc09797311a0be1b480.tar.bz2 rails-0d8b3c2e7fba5f1d35c3cbc09797311a0be1b480.zip |
Shrink a couple of deprecation warnings to one-liners
The previous spelling seemed a bit too generous with the whitespace, and
looked out of place when amongst others.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_type.rb | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index b64f660ec5..b8d395854c 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -47,15 +47,10 @@ module Mime def const_missing(sym) ext = sym.downcase if Mime[ext] - ActiveSupport::Deprecation.warn <<-eow -Accessing mime types via constants is deprecated. Please change: - - `Mime::#{sym}` - -to: - - `Mime[:#{ext}]` - eow + ActiveSupport::Deprecation.warn(<<-MSG.squish) + Accessing mime types via constants is deprecated. + Please change `Mime::#{sym}` to `Mime[:#{ext}]`. + MSG Mime[ext] else super @@ -65,15 +60,10 @@ to: def const_defined?(sym, inherit = true) ext = sym.downcase if Mime[ext] - ActiveSupport::Deprecation.warn <<-eow -Accessing mime types via constants is deprecated. Please change: - - `Mime.const_defined?(#{sym})` - -to: - - `Mime[:#{ext}]` - eow + ActiveSupport::Deprecation.warn(<<-MSG.squish) + Accessing mime types via constants is deprecated. + Please change `Mime.const_defined?(#{sym})` to `Mime[:#{ext}]`. + MSG true else super |