Class: Aeternitas::PollableMetaData

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
AASM
Defined in:
lib/aeternitas/pollable_meta_data.rb

Overview

Stores the meta data of all pollables Every pollable needs to have exactly one meta data object

Instance Method Summary collapse

Instance Method Details

#disable_polling(reason = nil) ⇒ Object

Disables polling of this instance

Parameters:

  • reason (String) (defaults to: nil)

    Reason for the deactivation. (E.g. an error message)



75
76
77
78
79
80
# File 'lib/aeternitas/pollable_meta_data.rb', line 75

def disable_polling(reason = nil)
  deactivate
  self.deactivation_reason = reason.to_s
  self.deactivated_at = Time.now
  save!
end