Module: Crm::Core::Mixins::ChangeLoggable
- Included in:
- Account, Activity, Crm::Collection, Crm::Contact, Event, EventContact, Mailing, TemplateSet, Type
- Defined in:
- lib/crm/core/mixins/change_loggable.rb
Overview
ChangeLoggable provides access to the change log of a resource. A change log entry contains the before and after values of all attributes that were changed by an update. It also includes the author (changed_by) and the timestamp (changed_at) of the change.
Defined Under Namespace
Classes: Change
Instance Method Summary collapse
-
#changes(limit: 10) ⇒ Array<Change>
Returns the most recent changes made to this item.
Instance Method Details
#changes(limit: 10) ⇒ Array<Change>
Returns the most recent changes made to this item.
92 93 94 95 96 |
# File 'lib/crm/core/mixins/change_loggable.rb', line 92 def changes(limit: 10) RestApi.instance.get("#{path}/changes", {"limit" => limit})['results'].map do |change| Change.new(change) end end |