I have the follow code to trap some exceptions in a controller.
The code seems to run fine on my development machine but on
production, it goes into an infinitely loop (eventually a stack
overflow) trapping at the create_without_jazz() method call. Does
anyone see a potential problem with the the way I'm handling
the exceptions? (note: render() is not in the correct context, so I
couldn't use around filter). Thanks in advance for all your help.
class FooBarsController < ApplicationController
before_filter(:only => :create) do
rescue Exception => e
render :text => 'error'
alias :create_without_jazz :create
alias :create :create_with_jazz
raise 'foo bar create'
render :text => 'foo bar'