Class: Arkaan::Event
- Inherits:
-
Object
- Object
- Arkaan::Event
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/arkaan/event.rb
Overview
An event is symbolizing a timestamped change in a model. It is recommended NOT to use this class directly but to use the Arkaan::Concerns::Historizable concern in a model.
Instance Attribute Summary collapse
-
#document ⇒ Any
The model in which the history is embedded.
-
#field ⇒ String
The name of the field being historized.
-
#from ⇒ Any
The value of the field before update.
-
#to ⇒ Any
The value of the field after update.
Instance Attribute Details
#document ⇒ Any
Returns the model in which the history is embedded.
25 |
# File 'lib/arkaan/event.rb', line 25 :document, polymorphic: true, inverse_of: :history |
#field ⇒ String
Returns the name of the field being historized.
15 |
# File 'lib/arkaan/event.rb', line 15 field :field, type: String |
#from ⇒ Any
Returns the value of the field before update.
18 |
# File 'lib/arkaan/event.rb', line 18 field :from |
#to ⇒ Any
Returns the value of the field after update.
21 |
# File 'lib/arkaan/event.rb', line 21 field :to |