module Rollbar::MongoidExtension

Public Instance Methods

report_validation_errors_to_rollbar() click to toggle source
# File lib/rollbar/mongoid_extension.rb, line 5
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