1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Don't try to log protected attribute removal if there's no logger defined [#3135 state:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
This commit is contained in:
Jeffrey Hardy 2009-09-02 11:20:52 -05:00 committed by Joshua Peek
parent 41b3c912b7
commit e870e24887

View file

@ -2943,7 +2943,9 @@ module ActiveRecord #:nodoc:
end end
def log_protected_attribute_removal(*attributes) def log_protected_attribute_removal(*attributes)
logger.debug "WARNING: Can't mass-assign these protected attributes: #{attributes.join(', ')}" if logger
logger.debug "WARNING: Can't mass-assign these protected attributes: #{attributes.join(', ')}"
end
end end
# The primary key and inheritance column can never be set by mass-assignment for security reasons. # The primary key and inheritance column can never be set by mass-assignment for security reasons.