diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-06-02 04:16:03 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-06-02 04:16:03 +0000 |
commit | 5240d7a84b2c4919cbc9f6d0d95c45b6b75227ae (patch) | |
tree | 77303849a8ba69688a4eea86055d6c1d975a6e90 /actionpack/lib | |
parent | 984aa7eeb9da2860e6cd8954a93657c774eff207 (diff) | |
download | rails-5240d7a84b2c4919cbc9f6d0d95c45b6b75227ae.tar.gz rails-5240d7a84b2c4919cbc9f6d0d95c45b6b75227ae.tar.bz2 rails-5240d7a84b2c4919cbc9f6d0d95c45b6b75227ae.zip |
Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/mime_type.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/mime_type.rb b/actionpack/lib/action_controller/mime_type.rb index 6ed72971cd..a2233477bd 100644 --- a/actionpack/lib/action_controller/mime_type.rb +++ b/actionpack/lib/action_controller/mime_type.rb @@ -117,6 +117,7 @@ module Mime end ALL = Type.new "*/*", :all + TEXT = Type.new "text/plain", :text HTML = Type.new "text/html", :html, %w( application/xhtml+xml ) JS = Type.new "text/javascript", :js, %w( application/javascript application/x-javascript ) ICS = Type.new "text/calendar", :ics @@ -130,6 +131,8 @@ module Mime LOOKUP["*/*"] = ALL + LOOKUP["text/plain"] = TEXT + LOOKUP["text/html"] = HTML LOOKUP["application/xhtml+xml"] = HTML @@ -155,6 +158,8 @@ module Mime EXTENSION_LOOKUP["html"] = HTML EXTENSION_LOOKUP["xhtml"] = HTML + EXTENSION_LOOKUP["txt"] = TEXT + EXTENSION_LOOKUP["xml"] = XML EXTENSION_LOOKUP["js"] = JS |