class ActionController::Responder

def navigation_behavior(error)

This is the common behavior for formats associated with browsing, like :html, :iphone and so forth.
def navigation_behavior(error)
  if get?
    raise error
  elsif has_errors? && default_action
    render error_rendering_options
  else
    redirect_to navigation_location, status: redirect_status
  end
end