Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4406

Show
Ignore:
Timestamp:
06/02/06 04:16:03 (2 years ago)
Author:
david
Message:

Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [DHH]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r4405 r4406  
    11*SVN* 
     2 
     3* Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [DHH] 
    24 
    35* Added Mime::Type.register(string, symbol, synonyms = []) for adding new custom mime types [DHH]. Example: Mime::Type.register("image/gif", :gif) 
  • trunk/actionpack/lib/action_controller/mime_type.rb

    r4405 r4406  
    118118 
    119119  ALL   = Type.new "*/*", :all 
     120  TEXT  = Type.new "text/plain", :text 
    120121  HTML  = Type.new "text/html", :html, %w( application/xhtml+xml ) 
    121122  JS    = Type.new "text/javascript", :js, %w( application/javascript application/x-javascript ) 
     
    130131 
    131132  LOOKUP["*/*"]                      = ALL 
     133 
     134  LOOKUP["text/plain"]               = TEXT 
    132135 
    133136  LOOKUP["text/html"]                = HTML 
     
    156159  EXTENSION_LOOKUP["xhtml"] = HTML 
    157160 
     161  EXTENSION_LOOKUP["txt"]   = TEXT 
     162 
    158163  EXTENSION_LOOKUP["xml"]   = XML 
    159164