Module: Mongoid::Config::DeprecatedOptions
- Included in:
- Mongoid::Config
- Defined in:
- lib/mongoid/config.rb
Constant Summary collapse
- OPTIONS =
%i[]
Class Method Summary collapse
Class Method Details
.prepended(klass) ⇒ Object
431 432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/mongoid/config.rb', line 431 def self.prepended(klass) klass.class_eval do OPTIONS.each do |option| alias_method :"#{option}_without_deprecation=", :"#{option}=" define_method(:"#{option}=") do |value| Mongoid::Warnings.send(:"warn_#{option}_deprecated") send(:"#{option}_without_deprecation=", value) end end end end |