Displaying 1 result from an estimated 1 matches for "success_controller".
2006 Sep 22
6
Using after_filter to control rendering on actions
...er to upon failing 
some test that occurs in an after_filter method.
I''d like to use the after_filter to take over the control of the 
rendering, like so:
def test_for_validity
  some_boolean = my_test
  return render(:action => ''disqualified'') unless some_boolean
  @success_controller ||= controller_name
  @success_action ||= action_name
  return render(:controller => @success_controller, :action => 
@success_action)
end
In my action, if I do nothing unusual, then I expect to render to the 
regular place.  If I override @success_controller and/or 
@success_action, then my...