mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
TEMP
This commit is contained in:
parent
79ac8db0eb
commit
5da7019bd4
7 changed files with 3 additions and 70 deletions
|
@ -1,18 +0,0 @@
|
|||
# Log all active model user errors
|
||||
module ActiveModel
|
||||
class Errors
|
||||
def add(attribute, message = :invalid, options = {})
|
||||
message = normalize_message(attribute, message, options)
|
||||
if exception = options[:strict]
|
||||
exception = ActiveModel::StrictValidationFailed if exception == true
|
||||
raise exception, full_message(attribute, message)
|
||||
end
|
||||
|
||||
# CUSTOM logging
|
||||
Rails.logger.info "USER MSG: ACTIVEMODEL: #{@base.try(:class)} [#{attribute}] #{message}" if message.present?
|
||||
# END of CUSTOM logging
|
||||
|
||||
self[attribute] << message
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue