Flowdock
method

format=

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActionController::AbstractRequest

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.2.1) is shown here.

These similar methods exist in v6.1.7.7:

format=(extension) public

Sets the \format by string extension, which can be used to force custom formats that are not controlled by the extension.

  class ApplicationController < ActionController::Base
    before_filter :adjust_format_for_iphone

    private
      def adjust_format_for_iphone
        request.format = :iphone if request.env["HTTP_USER_AGENT"][/iPhone/]
      end
  end
Show source
Register or log in to add new notes.