tire_async_index
tire_async_index copied to clipboard
Handles case if object no longer exists.
Handles case if object no longer exists.
First of all it's not a good Idea to simply catch all exceptions.
I guess your problem is related to ActiveRecord.find raising an error in case of an error.
I add the following method to my model:
def self.tire_async_finder(id)
find_by(id: id)
end
find_by returns nil when not found.