Module: Kalimba::Callbacks

Included in:
Resource
Defined in:
lib/kalimba/callbacks.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



5
6
7
8
9
# File 'lib/kalimba/callbacks.rb', line 5

def destroy
  run_callbacks :destroy do
    super
  end
end

#save(options = {}) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/kalimba/callbacks.rb', line 11

def save(options = {})
  run_callbacks :save do
    persistence_callback_type = new_record? ? :create : :update
    run_callbacks persistence_callback_type do
      super
    end
  end
end