KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way to catch all uncatched exceptions in a rails controller, like this: def delete schedule_id = params[:scheduleId] begin Schedules.delete(schedule_id) rescue ActiveRecord::RecordNotFound render :json => "record not found" rescue ActiveRecord::CatchAll #Only comes in here if nothing else catches the error end render :json => "ok" end Thank you
Tags (comma-separated)
Save Edits
Cancel