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

Changeset 4665

Show
Ignore:
Timestamp:
08/05/06 02:00:04 (2 years ago)
Author:
nzkoz
Message:

Short documentation to mention use of Mime::Type.register. Closes #5710 [choonkeat@gmail.com]

Files:

Legend:

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

    r4664 r4665  
    11*SVN* 
     2 
     3* Short documentation to mention use of Mime::Type.register. #5710 [choonkeat@gmail.com] 
    24 
    35* Make controller_path available as an instance method.  #5724 [jmckible@gmail.com] 
  • trunk/actionpack/lib/action_controller/mime_responds.rb

    r4541 r4665  
    9393      # in a single request (i.e., by wrapping them all in a single root note), but if you just go with the flow  
    9494      # and accept Rails' defaults, life will be much easier. 
     95      #  
     96      # If you need to use a MIME type which isn't supported by default, you can register your own handlers in 
     97      # environment.rb as follows. 
     98      #  
     99      #   Mime::Type.register "image/jpg", :jpg 
     100      #  
    95101      def respond_to(*types, &block) 
    96102        raise ArgumentError, "respond_to takes either types or a block, never both" unless types.any? ^ block