Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4622

Why including Rescuable module doesn't work?

$
0
0
class MyKlass  include ActiveSupport::Rescuable  rescue_from Exception do    return "rescued"  end  #other stuffend

MyKlass is pure ruby object, but defined inside Rails application.

If I try to invoke MyKlass instance in rails console and then apply to it method which certainly should raise Exception, nothing happens other than error expected to be rescued.


Viewing all articles
Browse latest Browse all 4622

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>