Module: ActiveRecord::DynamicMatchers::DeprecationWarning
- Included in:
- FindAllBy, FindLastBy, Instantiator, ScopedBy
- Defined in:
- lib/active_record/deprecated_finders/dynamic_matchers.rb
Instance Method Summary collapse
Instance Method Details
#body ⇒ Object
23 24 25 |
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 23 def body "#{deprecation_warning}\n#{super}" end |
#deprecation_warning ⇒ Object
27 28 29 |
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 27 def deprecation_warning %{ActiveSupport::Deprecation.warn("This dynamic method is deprecated. Please use e.g. #{deprecation_alternative} instead.")} end |