accepts() Ver: 2.0.1
From: ActionController::AbstractRequest Version 2.0.1
Comments

Returns the accepted MIME type for the request

Sourcecode
# File /Users/nshb/svn/svn.inimit.com/railsmanual.com/www/trunk/src/rails-2.0.1/actionpack/lib/action_controller/request.rb, line 81
    def accepts
      @accepts ||=
        if @env['HTTP_ACCEPT'].to_s.strip.empty?
          [ content_type, Mime::ALL ].compact # make sure content_type being nil is not included
        else
          Mime::Type.parse(@env['HTTP_ACCEPT'])
        end
    end
Add New Note User Added Notes