within my rails application i have a view which does an ajax call for
saving data. what i'd like to do is raise an exception within my
controller that causes the onFailure event to be triggered. for
render :text => "order item deleted"
rescue Exception => e
flash[:notice] = e.message
when an exception is captured i.e the rescue exception, how can i
raise an exception; in other langages/platforms i'd construct a 406
(if i remember correctly) response and write a nice message which
would then be captured by the ajax call and prompt the user.
any help would be greatly appreciated.