Class: Rollbacker::Recorder

Inherits:
Object
  • Object
show all
Includes:
Status
Defined in:
lib/rollbacker/recorder.rb

Instance Method Summary collapse

Methods included from Status

#disable_rollbacker!, #enable_rollbacker!, #rollbacker_as, #rollbacker_disabled?, #rollbacker_enabled?, #with_rollbacker, #without_rollbacker

Constructor Details

#initialize(options, &blk) ⇒ Recorder

def initialize(action, options, &blk)

@action  = action
@options = options
@blk     = blk

end



13
14
15
16
# File 'lib/rollbacker/recorder.rb', line 13

def initialize(options, &blk)
  @options = options
  @blk     = blk
end

Instance Method Details

#after_rollback(model) ⇒ Object



18
19
20
# File 'lib/rollbacker/recorder.rb', line 18

def after_rollback(model)
  create_or_update_changes(model)
end