Module: Mime
- Defined in:
- lib/action_controller/mime_type.rb
Defined Under Namespace
Classes: Type
Constant Summary collapse
- 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
- 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
- YAML =
Type.new "application/x-yaml", :yaml, %w( text/yaml )
- JSON =
Type.new "application/json", :json, %w( text/x-json )
- SET =
[ ALL, TEXT, HTML, JS, ICS, XML, RSS, ATOM, YAML, JSON ]
- LOOKUP =
Hash.new { |h, k| h[k] = Type.new(k) unless k == "" }
- EXTENSION_LOOKUP =
Hash.new { |h, k| h[k] = Type.new(k) unless k == "" }