Module: Decidim::Deprecations
- Defined in:
- lib/decidim/deprecations.rb
Overview
This class handles all logic regarding deprecated methods.
Instance Method Summary collapse
-
#deprecated_alias(old_name, replacement) ⇒ Object
Define a deprecated alias for a method.
Instance Method Details
#deprecated_alias(old_name, replacement) ⇒ Object
Define a deprecated alias for a method
12 13 14 15 16 17 |
# File 'lib/decidim/deprecations.rb', line 12 def deprecated_alias(old_name, replacement) define_method(old_name) do |*args, &block| ActiveSupport::Deprecation.warn "##{old_name} deprecated (please use ##{replacement})" send replacement, *args, &block end end |