Method: Fabrication::Generator::Base#execute_deprecated_callbacks

Defined in:
lib/fabrication/generator/base.rb

#execute_deprecated_callbacks(callbacks, callback_type, replacement_callback) ⇒ Object



37
38
39
40
41
42
43
44
45
46
# File 'lib/fabrication/generator/base.rb', line 37

def execute_deprecated_callbacks(callbacks, callback_type, replacement_callback)
  if callbacks[callback_type]
    Fabrication::Support.log_deprecation(
      "Using #{callback_type} is deprecated but you can replace it " \
      "with #{replacement_callback} with the same result."
    )
  end

  execute_callbacks(callbacks[callback_type])
end