module Decidim::Deprecations
This class handles all logic regarding deprecated methods.
Public Instance Methods
deprecated_alias(old_name, replacement)
click to toggle source
Define a deprecated alias for a method
@param [Symbol] old_name - name of the method to deprecate @param [Symbol] replacement - name of the new method to use
# 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