Sha256: e8cd1f6d66f7cb18615c7abc212daec8319c37e901ff80d143317de3c2efc6e3

Contents?: true

Size: 440 Bytes

Versions: 53

Compression:

Stored size: 440 Bytes

Contents

module Rollbar
  module ActiveRecordExtension
    extend ActiveSupport::Concern

    def report_validation_errors_to_rollbar
      self.errors.full_messages.each do |error|
        Rollbar.log_info "[Rollbar] Reporting form validation error: #{error} for #{self.to_s}"
        Rollbar.warning("Form Validation Error: #{error} for #{self.to_s}")
      end
    end
  end
end

ActiveRecord::Base.send(:include, Rollbar::ActiveRecordExtension)

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
rollbar-2.10.0 lib/rollbar/active_record_extension.rb
rollbar-2.9.1 lib/rollbar/active_record_extension.rb
rollbar-2.9.0 lib/rollbar/active_record_extension.rb
rollbar-2.8.3 lib/rollbar/active_record_extension.rb
rollbar-2.8.2 lib/rollbar/active_record_extension.rb
rollbar-2.8.1 lib/rollbar/active_record_extension.rb
rollbar-2.8.0 lib/rollbar/active_record_extension.rb
rollbar-2.7.1 lib/rollbar/active_record_extension.rb
rollbar-2.7.0 lib/rollbar/active_record_extension.rb
rollbar-2.6.3 lib/rollbar/active_record_extension.rb
rollbar-2.6.2 lib/rollbar/active_record_extension.rb
rollbar-2.6.1 lib/rollbar/active_record_extension.rb
rollbar-2.6.0 lib/rollbar/active_record_extension.rb
rollbar-2.5.2 lib/rollbar/active_record_extension.rb
rollbar-2.5.1 lib/rollbar/active_record_extension.rb
rollbar-2.5.0 lib/rollbar/active_record_extension.rb
rollbar-2.4.0 lib/rollbar/active_record_extension.rb
rollbar-2.3.0 lib/rollbar/active_record_extension.rb
rollbar-2.2.1 lib/rollbar/active_record_extension.rb
rollbar-2.2.0 lib/rollbar/active_record_extension.rb