public Method

Base.template_format

symbolized version of the :format parameter of the request, or :html by default.

Source Code

# File action_view/base.rb, line 348
def template_format
  return @template_format if @template_format
  format = controller && controller.respond_to?(:request) && controller.request.parameters[:format]
  @template_format = format.blank? ? :html : format.to_sym
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.