search for: test_for_validity

Displaying 1 result from an estimated 1 matches for "test_for_validity".

2006 Sep 22
6
Using after_filter to control rendering on actions
I have a common failure page that I may need to render 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...