Sha256: fb65d8a66146d09d43a9098da849a555e14fbf5f30a5945131361b4e4e4eeda1

Contents?: true

Size: 447 Bytes

Versions: 10

Compression:

Stored size: 447 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.report_message("Form Validation Error: #{error} for #{self.to_s}")
      end
    end
  end
end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rollbar-1.1.0 lib/rollbar/active_record_extension.rb
rollbar-1.0.1 lib/rollbar/active_record_extension.rb
rollbar-1.0.0 lib/rollbar/active_record_extension.rb
rollbar-0.13.2 lib/rollbar/active_record_extension.rb
rollbar-0.13.1 lib/rollbar/active_record_extension.rb
rollbar-0.13.0 lib/rollbar/active_record_extension.rb
rollbar-0.12.20 lib/rollbar/active_record_extension.rb
rollbar-0.12.19 lib/rollbar/active_record_extension.rb
rollbar-0.12.18 lib/rollbar/active_record_extension.rb
rollbar-0.12.17 lib/rollbar/active_record_extension.rb