I have a problem handling errors for RecordNotFound (Page 86 of Agile
Book), I want to redirect bad items id to “list” with a flash “Invalid
Item”, but this works only with numeric id, if I use some like
“wibble” the result is an empty list of items.
This is in my item_controller:
@item = Item.find(params[:id])
redirect_to :action => ‘list’
flash[:notice] = ‘Invalid Item’