Module: Mongoid::Config::DeprecatedOptions
- Included in:
- Mongoid::Config
- Defined in:
- build/mongoid-8.1/lib/mongoid/config.rb
Constant Summary collapse
- OPTIONS =
%i[ use_activesupport_time_zone broken_aggregables broken_alias_handling broken_and broken_scoping broken_updates compare_time_by_ms legacy_attributes legacy_pluck_distinct legacy_triple_equals object_id_as_json_oid overwrite_chained_operators ]
Class Method Summary collapse
Class Method Details
.prepended(klass) ⇒ Object
443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'build/mongoid-8.1/lib/mongoid/config.rb', line 443 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 |