lib/card/error.rb in card-1.19.6 vs lib/card/error.rb in card-1.20.0
- old
+ new
@@ -43,9 +43,11 @@
end
end
class << self
def exception_view card, exception
+ Card::Error.current = exception
+
case exception
## arguably the view and status should be defined in the error class;
## some are redundantly defined in view
when Card::Error::Oops, Card::Error::BadQuery
card.errors.add :exception, exception.message