Mime
No documentation available for this module.
Constants
ALL = Type.new "*/*", :all
ATOM = Type.new "application/atom+xml", :atom
HTML = Type.new "text/html", :html, %w( application/xhtml+xml )
JS = Type.new "text/javascript", :js, %w( application/javascript application/x-javascript )
LOOKUP = Hash.new { |h, k| h[k] = Type.new(k) }
RSS = Type.new "application/rss+xml", :rss
XML = Type.new "application/xml", :xml, %w( text/xml application/x-xml )
YAML = Type.new "application/x-yaml", :yaml, %w( text/yaml )
Files
- actionpack/lib/action_controller/mime_type.rb
Nested classes and modules
1Note
Default Mime Types
This module sets up all the default mime-types. Here they are:
"/" => :all
"text/plain" => :text
"text/html" => :html
"application/xhtml+xml" => :html
"text/javascript" => :js
"application/javascript" => :js
"application/x-javascript" => :js
"text/calendar" => :ics
"text/csv" => :csv
"application/xml" => :xml
"text/xml" => :xml
"application/x-xml" => :xml
"text/yaml" => :yaml
"application/x-yaml" => :yaml
"application/rss+xml" => :rss
"application/atom+xml" => :atom
"application/json" => :json
"text/x-json" => :json