class PlaceOS::Model::Driver
- PlaceOS::Model::Driver
- PlaceOS::Model::ModelBase
- PgORM::Base
- ActiveModel::Model
- Reference
- Object
Included Modules
Defined in:
placeos-models/driver.crConstant Summary
-
CALLBACKS =
{before_save: [:check_update_available] of Nil, after_save: [:update_modules] of Nil, before_create: [do self.created_at = self.updated_at = Time.utc end] of Nil, after_create: [] of Nil, before_update: [do self.updated_at = Time.utc end] of Nil, after_update: [] of Nil, before_destroy: [:destroy_settings_and_versions, :cleanup_modules] of Nil, after_destroy: [] of Nil}
-
Log =
::Log.for(self)
-
RECOMPILE_PREFIX =
"RECOMPILE-"
Constructors
- .from_json(string_or_io : String | IO, trusted : Bool = false) : self
-
.from_json(string_or_io : String | IO, root : String, trusted : Bool = false) : self
Deserializes the given JSON in string_or_io into an instance of
self
, assuming the JSON consists of an JSON object with key root, and whose value is the value to deserialize. - .from_trusted_json(string_or_io : String | IO, root : String) : self
-
.from_trusted_json(string_or_io : String | IO) : self
Serialize from a trusted JSON source
-
.from_trusted_yaml(string_or_io : String | IO) : self
Serialize from a trusted YAML source
- .from_yaml(string_or_io : String | IO, trusted : Bool = false) : self
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
- .new(rs : DB::ResultSet)
- .new(created_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, updated_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, name : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, description : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, json_schema : JSON::Any | ActiveModel::Model::None = ::ActiveModel::Model::None.new, default_uri : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, default_port : Int32 | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, role : PlaceOS::Model::Driver::Role | ActiveModel::Model::None = ::ActiveModel::Model::None.new, file_name : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, commit : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, compilation_output : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, module_name : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, ignore_connected : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, update_available : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, update_info : PlaceOS::Model::Driver::UpdateInfo | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, repository_id : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new)
-
.new(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
Initialize PlaceOS::Model::Driver from
HTTP::Params
.
Class Method Summary
-
.attributes : Array(Symbol)
Returns all attribute keys.
- .auto_generate_id : Bool
-
.by_repository_id(id)
Look up instances of this model dependent on the foreign key
-
.changes(id : PrimaryKeyType = nil) : ChangeFeed
Changefeed at row (if
#id
passed) or whole table level. - .elastic
- .from_rs(__temp_628 : DB::ResultSet)
- .on_error(err : Exception | IO::Error)
- .primary_key : Symbol
-
.require_updates : Array(self)
Returns the list of Drivers which has update available
- .table_name
Instance Method Summary
-
#__repository : Repository | Nil
Association ##############################################################################################
-
#__repository=(__repository : Repository | Nil)
Association ##############################################################################################
-
#after_create
Base class for all Engine models
-
#after_destroy
Base class for all Engine models
- #after_initialize(trusted : Bool)
-
#after_save
Base class for all Engine models
-
#after_update
Base class for all Engine models
-
#apply_defaults
Generate code to apply default values
-
#assign_attributes(created_at : Time | Missing = Missing, updated_at : Time | Missing = Missing, name : String | Missing = Missing, description : String | Missing = Missing, json_schema : JSON::Any | Missing = Missing, default_uri : String | Nil | Missing = Missing, default_port : Int32 | Nil | Missing = Missing, role : PlaceOS::Model::Driver::Role | Missing = Missing, file_name : String | Missing = Missing, commit : String | Missing = Missing, compilation_output : String | Nil | Missing = Missing, module_name : String | Missing = Missing, ignore_connected : Bool | Missing = Missing, update_available : Bool | Missing = Missing, update_info : PlaceOS::Model::Driver::UpdateInfo | Nil | Missing = Missing, repository_id : String | Missing = Missing, id : String | Nil | Missing = Missing)
Assign to multiple attributes.
-
#assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
Assign to mulitple attributes via
HTTP::Params
. -
#assign_attributes(model : PlaceOS::Model::Driver)
Assign to multiple attributes from a model object
- #assign_attributes_from_json(json, root : String)
- #assign_attributes_from_json(json)
- #assign_attributes_from_trusted_json(json, root : String)
-
#assign_attributes_from_trusted_json(json)
Assign each field from JSON if field exists in JSON and has changed in model
- #assign_attributes_from_trusted_yaml(yaml)
-
#assign_attributes_from_yaml(yaml)
Uses the YAML parser as JSON is valid YAML
-
#attributes
Returns a
Hash
of all attribute values -
#attributes_tuple
Returns a
NamedTuple
of all attribute values. -
#before_create
Base class for all Engine models
-
#before_destroy
Base class for all Engine models
-
#before_save
Base class for all Engine models
-
#before_update
Base class for all Engine models
-
#changed?
Check if any attributes have changed.
-
#changed_attributes
Returns a
Hash
with all changed attributes. -
#changed_json(io : IO) : Nil
Serialize the set of changed attributes to JSON.
-
#changed_json : String
Serialize the set of changed attributes to JSON.
- #changed_persist_attributes
-
#changed_yaml(io : IO) : Nil
Serialize the set of changed attributes to YAML.
-
#changed_yaml : String
Serialize the set of changed attributes to YAML.
-
#clear_changes_information
Reset changes for all attributes.
-
#commit : String
#commit
getter -
#commit=(value : String)
#commit
setter -
#commit? : String | Nil
Commit/version of driver to compile
- #commit_assigned? : Bool
-
#commit_change : Tuple(String | Nil, String | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #commit_changed? : Bool
-
#commit_default : String
#commit
's default value -
#commit_present? : Bool
Commit/version of driver to compile
- #commit_was : String | Nil
-
#commit_will_change! : Nil
Include
#commit
in the set of changed attributes, whether it has changed or not. -
#compilation_output : String | Nil
#compilation_output
getter -
#compilation_output=(value : String | Nil)
#compilation_output
setter - #compilation_output_assigned? : Bool
-
#compilation_output_change : Tuple(String | Nil | Nil, String | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #compilation_output_changed? : Bool
-
#compilation_output_default : String | Nil
#compilation_output
's default value -
#compilation_output_present? : Bool
Output of the last failed compilation
- #compilation_output_was : String | Nil | Nil
-
#compilation_output_will_change! : Nil
Include
#compilation_output
in the set of changed attributes, whether it has changed or not. -
#created_at : Time
#created_at
getter -
#created_at=(value : Time)
Setters
#created_at
setter - #created_at? : Time | Nil
- #created_at_assigned? : Bool
-
#created_at_change : Tuple(Time | Nil, Time | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #created_at_changed? : Bool
-
#created_at_default : Time
#created_at
's default value - #created_at_present? : Bool
- #created_at_was : Time | Nil
-
#created_at_will_change! : Nil
Include
#created_at
in the set of changed attributes, whether it has changed or not. -
#default_port : Int32 | Nil
#default_port
getter -
#default_port=(value : Int32 | Nil)
#default_port
setter - #default_port=(port)
- #default_port_assigned? : Bool
-
#default_port_change : Tuple(Int32 | Nil | Nil, Int32 | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #default_port_changed? : Bool
-
#default_port_default : Int32 | Nil
#default_port
's default value - #default_port_present? : Bool
- #default_port_was : Int32 | Nil | Nil
-
#default_port_will_change! : Nil
Include
#default_port
in the set of changed attributes, whether it has changed or not. -
#default_uri : String | Nil
#default_uri
getter -
#default_uri=(value : String | Nil)
#default_uri
setter - #default_uri=(uri)
- #default_uri_assigned? : Bool
-
#default_uri_change : Tuple(String | Nil | Nil, String | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #default_uri_changed? : Bool
-
#default_uri_default : String | Nil
#default_uri
's default value - #default_uri_present? : Bool
- #default_uri_was : String | Nil | Nil
-
#default_uri_will_change! : Nil
Include
#default_uri
in the set of changed attributes, whether it has changed or not. -
#description : String
#description
getter -
#description=(value : String)
#description
setter - #description? : String | Nil
- #description_assigned? : Bool
-
#description_change : Tuple(String | Nil, String | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #description_changed? : Bool
-
#description_default : String
#description
's default value - #description_present? : Bool
- #description_was : String | Nil
-
#description_will_change! : Nil
Include
#description
in the set of changed attributes, whether it has changed or not. -
#destroy_settings_and_versions
Encrypted yaml settings
-
#file_name : String
#file_name
getter -
#file_name=(value : String)
#file_name
setter -
#file_name? : String | Nil
Path to driver, relative to repository directory
- #file_name_assigned? : Bool
-
#file_name_change : Tuple(String | Nil, String | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #file_name_changed? : Bool
-
#file_name_default : String
#file_name
's default value -
#file_name_present? : Bool
Path to driver, relative to repository directory
- #file_name_was : String | Nil
-
#file_name_will_change! : Nil
Include
#file_name
in the set of changed attributes, whether it has changed or not. -
#id : String | Nil
#id
getter -
#id=(value : String | Nil)
#id
setter -
#id? : String | Nil | Nil
Same as
#id
but may returnnil
when the record hasn't been saved instead of raising. - #id_assigned? : Bool
-
#id_change : Tuple(String | Nil | Nil, String | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #id_changed? : Bool
-
#id_default : String | Nil
#id
's default value - #id_present? : Bool
- #id_was : String | Nil | Nil
-
#id_will_change! : Nil
Include
#id
in the set of changed attributes, whether it has changed or not. -
#ignore_connected : Bool
#ignore_connected
getter -
#ignore_connected=(value : Bool)
#ignore_connected
setter -
#ignore_connected? : Bool | Nil
Don't include this module in statistics or disconnected searches Might be a device that commonly goes offline (like a PC or Display that only supports Wake on Lan)
- #ignore_connected_assigned? : Bool
-
#ignore_connected_change : Tuple(Bool | Nil, Bool | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #ignore_connected_changed? : Bool
-
#ignore_connected_default : Bool
#ignore_connected
's default value -
#ignore_connected_present? : Bool
Don't include this module in statistics or disconnected searches Might be a device that commonly goes offline (like a PC or Display that only supports Wake on Lan)
- #ignore_connected_was : Bool | Nil
-
#ignore_connected_will_change! : Nil
Include
#ignore_connected
in the set of changed attributes, whether it has changed or not. -
#invoke_props
Base class for all Engine models
-
#json_schema : JSON::Any
#json_schema
getter -
#json_schema=(value : JSON::Any)
#json_schema
setter - #json_schema? : JSON::Any | Nil
- #json_schema_assigned? : Bool
-
#json_schema_change : Tuple(JSON::Any | Nil, JSON::Any | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #json_schema_changed? : Bool
-
#json_schema_default : JSON::Any
#json_schema
's default value - #json_schema_present? : Bool
- #json_schema_was : JSON::Any | Nil
-
#json_schema_will_change! : Nil
Include
#json_schema
in the set of changed attributes, whether it has changed or not. -
#module_name : String
#module_name
getter -
#module_name=(value : String)
#module_name
setter -
#module_name? : String | Nil
Module instance configuration
- #module_name_assigned? : Bool
-
#module_name_change : Tuple(String | Nil, String | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #module_name_changed? : Bool
-
#module_name_default : String
#module_name
's default value -
#module_name_present? : Bool
Module instance configuration
- #module_name_was : String | Nil
-
#module_name_will_change! : Nil
Include
#module_name
in the set of changed attributes, whether it has changed or not. -
#modules
Find the modules that rely on this driver
-
#name : String
#name
getter -
#name=(value : String)
#name
setter - #name? : String | Nil
- #name_assigned? : Bool
-
#name_change : Tuple(String | Nil, String | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #name_changed? : Bool
-
#name_default : String
#name
's default value - #name_present? : Bool
- #name_was : String | Nil
-
#name_will_change! : Nil
Include
#name
in the set of changed attributes, whether it has changed or not. -
#persistent_attributes
Returns a
Hash
of all attributes that can be persisted. - #process_update_info(info : UpdateInfo)
-
#recompile(commit_hash : String | Nil = nil)
Sets the commit hash of the driver for a recompile event
-
#recompile_commit?
Returns the commit hash if the driver has a recompile commit hash
-
#repository : Repository | Nil
Retrieves the parent relationship
-
#repository! : Repository
Association ##############################################################################################
-
#repository=(parent : Repository)
Sets the parent relationship
-
#repository_id : String
#repository_id
getter -
#repository_id=(value : String)
#repository_id
setter -
#repository_id? : String | Nil
Association ##############################################################################################
- #repository_id_assigned? : Bool
-
#repository_id_change : Tuple(String | Nil, String | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #repository_id_changed? : Bool
-
#repository_id_default : String
#repository_id
's default value -
#repository_id_present? : Bool
Association ##############################################################################################
- #repository_id_was : String | Nil
-
#repository_id_will_change! : Nil
Include
#repository_id
in the set of changed attributes, whether it has changed or not. -
#reset_associations
Association ##############################################################################################
-
#restore_attributes
Reset each attribute to their previous values and clears all changes.
-
#role : PlaceOS::Model::Driver::Role
#role
getter -
#role=(value : PlaceOS::Model::Driver::Role)
#role
setter - #role? : PlaceOS::Model::Driver::Role | Nil
- #role_assigned? : Bool
-
#role_change : Tuple(PlaceOS::Model::Driver::Role | Nil, PlaceOS::Model::Driver::Role | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #role_changed? : Bool
-
#role_default : Role
#role
's default value - #role_present? : Bool
- #role_was : PlaceOS::Model::Driver::Role | Nil
-
#role_will_change! : Nil
Include
#role
in the set of changed attributes, whether it has changed or not. -
#run_create_callbacks(&)
Wrap a block with callbacks for the appropriate crud operation
-
#run_destroy_callbacks(&)
Base class for all Engine models
-
#run_save_callbacks(&)
Base class for all Engine models
-
#run_update_callbacks(&)
Base class for all Engine models
-
#settings_and_versions
Encrypted yaml settings
- #settings_hierarchy : Array(Settings)
- #table_name
-
#update_available : Bool
#update_available
getter -
#update_available=(value : Bool)
#update_available
setter - #update_available? : Bool | Nil
- #update_available_assigned? : Bool
-
#update_available_change : Tuple(Bool | Nil, Bool | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #update_available_changed? : Bool
-
#update_available_default : Bool
#update_available
's default value - #update_available_present? : Bool
- #update_available_was : Bool | Nil
-
#update_available_will_change! : Nil
Include
#update_available
in the set of changed attributes, whether it has changed or not. -
#update_info : PlaceOS::Model::Driver::UpdateInfo | Nil
#update_info
getter -
#update_info=(value : PlaceOS::Model::Driver::UpdateInfo | Nil)
#update_info
setter - #update_info_assigned? : Bool
-
#update_info_change : Tuple(PlaceOS::Model::Driver::UpdateInfo | Nil | Nil, PlaceOS::Model::Driver::UpdateInfo | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #update_info_changed? : Bool
-
#update_info_default : UpdateInfo | Nil
#update_info
's default value - #update_info_present? : Bool
- #update_info_was : PlaceOS::Model::Driver::UpdateInfo | Nil | Nil
-
#update_info_will_change! : Nil
Include
#update_info
in the set of changed attributes, whether it has changed or not. -
#updated_at : Time
#updated_at
getter -
#updated_at=(value : Time)
#updated_at
setter - #updated_at? : Time | Nil
- #updated_at_assigned? : Bool
-
#updated_at_change : Tuple(Time | Nil, Time | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
- #updated_at_changed? : Bool
-
#updated_at_default : Time
#updated_at
's default value - #updated_at_present? : Bool
- #updated_at_was : Time | Nil
-
#updated_at_will_change! : Nil
Include
#updated_at
in the set of changed attributes, whether it has changed or not. -
#validate_nilability
Validate that all non-nillable fields have values.
Instance methods inherited from module PlaceOS::Model::Utilities::SettingsHelper
all_settings : Hash(YAML::Any, YAML::Any)
all_settings,
settings : Array(Settings)
settings,
settings_at(encryption_level : Encryption::Level)
settings_at,
settings_at?(encryption_level : Encryption::Level)
settings_at?,
settings_hierarchy : Array(Settings)
settings_hierarchy,
settings_json : String
settings_json
Instance methods inherited from class PlaceOS::Model::ModelBase
after_create
after_create,
after_destroy
after_destroy,
after_save
after_save,
after_update
after_update,
apply_defaults
apply_defaults,
assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))assign_attributes(model : PlaceOS::Model::ModelBase)
assign_attributes assign_attributes, attributes attributes, attributes_tuple attributes_tuple, before_create before_create, before_destroy before_destroy, before_save before_save, before_update before_update, invoke_props invoke_props, persistent_attributes persistent_attributes, run_create_callbacks(&) run_create_callbacks, run_destroy_callbacks(&) run_destroy_callbacks, run_save_callbacks(&) run_save_callbacks, run_update_callbacks(&) run_update_callbacks
Constructor methods inherited from class PlaceOS::Model::ModelBase
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)new(pull : JSON::PullParser)
new(rs : DB::ResultSet) new
Class methods inherited from class PlaceOS::Model::ModelBase
attributes : Array(Symbol)
attributes,
auto_generate_id : Bool
auto_generate_id,
from_rs(rs : DB::ResultSet)
from_rs,
primary_key : Symbol
primary_key
Instance methods inherited from module PlaceOS::Model::Associations
format_list_for_postgres(list : Enumerable(String)) : String
format_list_for_postgres,
reset_associations
reset_associations
Class methods inherited from module PlaceOS::Model::Associations
format_list_for_postgres(list : Enumerable(String)) : String
format_list_for_postgres
Macros inherited from module PlaceOS::Model::Associations
belongs_to(parent_class, dependent = :none, association_name = nil, foreign_key = nil, presence = false, pk_type = nil, serialize = true)
belongs_to,
has_many(child_class, collection_name = nil, dependent = :none, foreign_key = nil, serialize = false)
has_many,
has_one(child_class, dependent = :none, association_name = nil, presence = false)
has_one
Constructor Detail
Deserializes the given JSON in string_or_io into
an instance of self
, assuming the JSON consists
of an JSON object with key root, and whose value is
the value to deserialize. Will not deserialise from
fields with mass_assign: false
class User < ActiveModel::Model
attribute name : String
attribute google_id : UUID, mass_assign: false
end
User.from_json(%({"main": {"name": "Jason", "google_id": "f6f70bfb-c882-446d-8758-7ce47db39620"}}), root: "main") # => #<User:0x103131b20 @name="Jason">
Serialize from a trusted JSON source
Serialize from a trusted YAML source
Initialize PlaceOS::Model::Driver from HTTP::Params
.
Class Method Detail
Changefeed at row (if #id
passed) or whole table level.
Returns a ChangeFeed
instance which can be used to invoke async callbacks via on
or
use blocking Iterator
via each
method.
Instance Method Detail
Association ##############################################################################################
Association ##############################################################################################
Base class for all Engine models
Base class for all Engine models
Base class for all Engine models
Base class for all Engine models
Assign to multiple attributes.
Assign to mulitple attributes via HTTP::Params
.
Assign to multiple attributes from a model object
Assign each field from JSON if field exists in JSON and has changed in model
Base class for all Engine models
Base class for all Engine models
Base class for all Engine models
Base class for all Engine models
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #commit
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #compilation_output
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #created_at
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #default_port
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #default_uri
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #description
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #file_name
in the set of changed attributes, whether it has changed or not.
Same as #id
but may return nil
when the record hasn't been saved
instead of raising.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #id
in the set of changed attributes, whether it has changed or not.
Don't include this module in statistics or disconnected searches Might be a device that commonly goes offline (like a PC or Display that only supports Wake on Lan)
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Don't include this module in statistics or disconnected searches Might be a device that commonly goes offline (like a PC or Display that only supports Wake on Lan)
Include #ignore_connected
in the set of changed attributes, whether it has changed or not.
Base class for all Engine models
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #json_schema
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #module_name
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #name
in the set of changed attributes, whether it has changed or not.
Sets the commit hash of the driver for a recompile event
Association ##############################################################################################
Association ##############################################################################################
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Association ##############################################################################################
Include #repository_id
in the set of changed attributes, whether it has changed or not.
Association ##############################################################################################
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #role
in the set of changed attributes, whether it has changed or not.
Base class for all Engine models
Base class for all Engine models
Base class for all Engine models
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #update_available
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #update_info
in the set of changed attributes, whether it has changed or not.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
Include #updated_at
in the set of changed attributes, whether it has changed or not.