diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-11-23 17:25:52 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-11-23 17:25:52 +0000 |
commit | f15d52fc4ab921f010325adfd543c0a0c29913d2 (patch) | |
tree | fb5abbbfc09fc04fadf84ab9f5cea71812eadc60 /actionpack/lib | |
parent | a02dbe0a3dee9c5f7645de74f233c57cabbdfcac (diff) | |
download | rails-f15d52fc4ab921f010325adfd543c0a0c29913d2.tar.gz rails-f15d52fc4ab921f010325adfd543c0a0c29913d2.tar.bz2 rails-f15d52fc4ab921f010325adfd543c0a0c29913d2.zip |
Added text/csv as a default mime type and included example on how to make your own in config/environment.rb [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5620 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 165e60cb74..1430f09fb1 100644 --- a/actionpack/lib/action_controller/mime_type.rb +++ b/actionpack/lib/action_controller/mime_type.rb @@ -135,6 +135,7 @@ module Mime 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 + CSV = Type.new "text/csv", :csv XML = Type.new "application/xml", :xml, %w( text/xml application/x-xml ) RSS = Type.new "application/rss+xml", :rss ATOM = Type.new "application/atom+xml", :atom @@ -157,6 +158,8 @@ module Mime LOOKUP["text/calendar"] = ICS + LOOKUP["text/csv"] = CSV + LOOKUP["application/xml"] = XML LOOKUP["text/xml"] = XML LOOKUP["application/x-xml"] = XML @@ -181,6 +184,8 @@ module Mime EXTENSION_LOOKUP["ics"] = ICS + EXTENSION_LOOKUP["csv"] = CSV + EXTENSION_LOOKUP["yml"] = YAML EXTENSION_LOOKUP["yaml"] = YAML |