begin29
11/8/2016 - 12:10 PM

Wrap any action in rails

Wrap any action in rails

include AbstractController::Callbacks
around_filter :wrap_it_in_error_catcher


def wrap_it_in_error_catcher
  begin
    yield
  rescue => e
    raise SomeExceptionClass.new
  end
end