# ri > AbstractController::DoubleRenderError

---
type: CommandReference
command: AbstractController::DoubleRenderError
mode: ri
section: 
source: rdoc
---

## Quick Reference

- `AbstractController::DoubleRenderError` — raised when a controller attempts to render twice in a single action
- `AbstractController::DoubleRenderError.new` — create a new instance of the error

## Name

`AbstractController::DoubleRenderError` is a custom error class raised when a controller action calls `render` or `redirect_to` more than once.

## Synopsis

ruby
class ApplicationController < ActionController::Base
  def show
    render json: @record
    render :show   # raises AbstractController::DoubleRenderError
  end
end
## Options

**Constants:**

- `DEFAULT_MESSAGE` — default error message (not documented)

**Class methods:**

- `new` — instantiate a new `DoubleRenderError` object

## Examples

ruby
begin
  render :index
  redirect_to root_path
rescue AbstractController::DoubleRenderError => e
  puts e.message
end
## See Also

- [AbstractController::Error](https://www.chedong.com/phpMan.php/perldoc/AbstractController%3A%3AError/markdown) — parent class of all controller errors

## Exit Codes

Not applicable (this is a Ruby exception class, not a command-line tool).