From 8ba50aaa273380f2083b8f44c56eac8e86d02720 Mon Sep 17 00:00:00 2001 From: Jon de Andres Date: Sun, 22 May 2016 15:55:49 +0100 Subject: [PATCH] Add immediate ActiveModel::Validations monkey patch Fixes #464 --- lib/rollbar/plugins/validations.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rollbar/plugins/validations.rb b/lib/rollbar/plugins/validations.rb index c5b66190..28629ed0 100644 --- a/lib/rollbar/plugins/validations.rb +++ b/lib/rollbar/plugins/validations.rb @@ -7,7 +7,7 @@ ActiveModel::VERSION::MAJOR >= 3 end - execute do + execute! do module Rollbar # Module that defines methods to be used by instances using # ActiveModel::Validations @@ -25,7 +25,7 @@ def report_validation_errors_to_rollbar end end - execute do + execute! do ActiveModel::Validations.module_eval do include Rollbar::ActiveRecordExtension end