aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/mime_type.rb5
-rw-r--r--railties/environments/environment.rb4
2 files changed, 9 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
diff --git a/railties/environments/environment.rb b/railties/environments/environment.rb
index f6301dab95..fe12591ded 100644
--- a/railties/environments/environment.rb
+++ b/railties/environments/environment.rb
@@ -53,4 +53,8 @@ end
# inflect.uncountable %w( fish sheep )
# end
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register "application/x-mobile", :mobile
+
# Include your application configuration below \ No newline at end of file