Class: Mongoid::Deprecation
- Inherits:
-
ActiveSupport::Deprecation
- Object
- ActiveSupport::Deprecation
- Mongoid::Deprecation
- Defined in:
- lib/mongoid/deprecation.rb
Overview
Utility class for logging deprecation warnings.
Instance Method Summary collapse
-
#behavior ⇒ Object
Overrides default ActiveSupport::Deprecation behavior to use Mongoid’s logger.
Instance Method Details
#behavior ⇒ Object
Overrides default ActiveSupport::Deprecation behavior to use Mongoid’s logger.
17 18 19 20 21 22 23 |
# File 'lib/mongoid/deprecation.rb', line 17 def behavior @behavior ||= Array(->(*args) { logger = Mongoid.logger logger.warn(args[0]) logger.debug(args[1].join("\n ")) if debug }) end |