Becareful of Rescues
Rescues are awesome and can lead to better manged code. But if you rescue for everything be prepared to hit your head against the wall while you try to understand why your tests fail silently. Rescue for the error you know will happen not for any and all errors.
rescue ActiveRecord::Missing => e
Much better than:
rescue => e
Written by Matthew Bergman
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#