api_behavior

api_behavior(error) Instance Protected methods This is the common behavior for formats associated with APIs, such as :xml and :json.

to_js

to_js() Instance Public methods #to_js simply tries to render a template. If no template is found, raises the error.

to_html

to_html() Instance Public methods HTML format does not render the resource, it always attempt to render a template.

to_format

to_format() Instance Public methods All other formats follow the procedure below. First we try to render a template, if the template is not available, we verify if the resource responds to :to_format and display it.

respond

respond() Instance Public methods Main entry point for responder responsible to dispatch to the proper format.

new

new(controller, resources, options={}) Class Public methods

call

call(*args) Class Public methods Initializes a new responder and invokes the proper format. If the format is not defined, call to_format.

show_detailed_exceptions?

show_detailed_exceptions?() Instance Public methods Override this method if you want to customize when detailed exceptions must be shown. This method is only called when consider_all_requests_local is false. By default, it returns false, but someone may set it to `request.local?` so local requests in production still shows the detailed exception pages.

rescue_with_handler

rescue_with_handler(exception) Instance Public methods

verify_same_origin_request

verify_same_origin_request() Instance Protected methods If `verify_authenticity_token` was run (indicating that we have forgery protection enabled for this request) then also verify that we aren't serving an unauthorized cross-origin response.