diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-10-28 00:13:08 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-10-28 00:13:08 -0700 |
commit | c5e73b897616049c613b0331dd53e88dbc9c1532 (patch) | |
tree | 15e013b08c1a73356bab0aee2cdfe7c727072352 /actionpack/lib/action_dispatch | |
parent | 0b2dd7afd9ee1dfe46506f9d745afb0a23e496ba (diff) | |
download | rails-c5e73b897616049c613b0331dd53e88dbc9c1532.tar.gz rails-c5e73b897616049c613b0331dd53e88dbc9c1532.tar.bz2 rails-c5e73b897616049c613b0331dd53e88dbc9c1532.zip |
Reduce TextTemplate cost for simple cases
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_type.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index e85823d8db..c30897b32a 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -24,6 +24,7 @@ module Mime LOOKUP = Hash.new { |h, k| h[k] = Type.new(k) unless k.blank? } def self.[](type) + return type if type.is_a?(Type) Type.lookup_by_extension(type.to_s) end |