Class: Core::Models::Event
- Inherits:
-
Object
- Object
- Core::Models::Event
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/core/models/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 Core::Models::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.
26 |
# File 'lib/core/models/event.rb', line 26 :document, polymorphic: true, inverse_of: :history |
#field ⇒ String
Returns the name of the field being historized.
16 |
# File 'lib/core/models/event.rb', line 16 field :field, type: String |
#from ⇒ Any
Returns the value of the field before update.
19 |
# File 'lib/core/models/event.rb', line 19 field :from |
#to ⇒ Any
Returns the value of the field after update.
22 |
# File 'lib/core/models/event.rb', line 22 field :to |