Module: Syncano::ActiveRecord::Callbacks

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/syncano/active_record/callbacks.rb

Overview

Module with callbacks functionality for Syncano::ActiveRecord

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#process_callbacks(type) ⇒ Object

Processes callbacks with specified type

Parameters:

  • type (Symbol, String)


37
38
39
40
41
42
43
# File 'lib/syncano/active_record/callbacks.rb', line 37

def process_callbacks(type)
  if respond_to?("#{type}_callbacks")
    send("#{type}_callbacks").each do |callback_name|
      send(callback_name)
    end
  end
end