use_renderers

use_renderers(*args) Instance Public methods Also aliased as: use_renderer

add

add(key, &block) Class Public methods Adds a new renderer to call within controller actions. A renderer is invoked by passing its name as an option to AbstractController::Rendering#render. To create a renderer pass it a name and a block. The block takes two arguments, the first is the value paired with its key and the second is the remaining hash of options passed to render. Create a csv renderer: ActionController::Renderers.add :csv do |obj, options| filename = options[:file

_handle_render_options

_handle_render_options(options) Instance Public methods

render_to_body

render_to_body(options) Instance Public methods

render_to_body

render_to_body(options = {}) Instance Public methods

render_to_string

render_to_string(*) Instance Public methods Overwrite #render_to_string because body can now be set to a rack body.

protect_from_forgery

protect_from_forgery(options = {}) Instance Public methods Turn on request forgery protection. Bear in mind that only non-GET, HTML/JavaScript requests are checked. class ApplicationController < ActionController::Base protect_from_forgery end class FooController < ApplicationController protect_from_forgery except: :index You can disable CSRF protection on controller by skipping the verification before_action: skip_before_action :verify_authenticity_token Valid Options:

new

new(controller) Class Public methods

handle_unverified_request

handle_unverified_request() Instance Public methods

new

new(controller) Class Public methods