Type:
Class
Constants:
TRAILING_STAR_REGEXP
:
/(text|application)\/\*/
PARAMETER_SEPARATOR_REGEXP
:
/;\s*\w+="?\w+"?/
Encapsulates the notion of a mime type. Can be used at render time, for example, with:
class PostsController < ActionController::Base
def show
@post = Post.find(params[:id])
respond_to do |format|
format.html
format.ics { render text: post.to_ics, mime_type: Mime::Type["text/calendar"] }
format.xml { render xml: @people }
end
end
end