Flowdock
method

performed?

Importance_1
Ruby on Rails latest stable (v4.2.1) - 1 note - Class: ActionController::Metal
performed?() public

Tests if render or redirect has already happened.

Show source
Register or log in to add new notes.
October 26, 2012
0 thanks

#performed? is an option when getting ActionController::DoubleRenderError

You can avoid `ActionController::DoubleRenderError (Can only render or redirect once per action)` with `#performed?`

For example

def index
  redirect_to not_found_path unless authenticated?
  render :action => 'update' unless performed?
end