class

PlaceOS::Model::GroupHistory

Inherits PgORM::Base < PgORM::Validators < PgORM::Table < PgORM::Persistence < PgORM::Associations < ActiveModel::Callbacks < ActiveModel::Validation < ActiveModel::Model < DB::Mappable < DB::Serializable < YAML::Serializable < JSON::Serializable < Reference < Object

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

Constants

CALLBACKS = { before_save: [] of Nil, after_save: [] of Nil, before_create: [do self.created_at = Time.utc end] of Nil, after_create: [] of Nil, before_update: [] of Nil, after_update: [] of Nil, before_destroy: [] of Nil, after_destroy: [] of Nil, }

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

PRIMARY_KEY_TYPES = {:id => UUID} of Nil => Nil

macro level key => type

PRIMARY_KEYS = [{:id}]

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

Constructors

from_json(string_or_io : String | IO, trusted : Bool = false) : self

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

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. 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">
from_trusted_json(string_or_io : String | IO, root : String) : self

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

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

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

Source
new(pull : JSON::PullParser)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

Source
new(rs : DB::ResultSet)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

new(id : UUID | ActiveModel::Model::None = ::ActiveModel::Model::None.new, group_id : UUID | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, user_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, email : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, action : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, resource_type : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, resource_id : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, changed_fields : Array(String) | ActiveModel::Model::None = ::ActiveModel::Model::None.new, created_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

Initialize PlaceOS::Model::GroupHistory from HTTP::Params.

Class methods

attributes

Returns all attribute keys.

changes(id : UUID | Nil = nil) : ChangeFeed

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.

from_rs(__temp_2355 : DB::ResultSet)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

on_error(err : Exception | IO::Error)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

primary_key

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

Source
table_name

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

Instance methods

action

action getter

action=(value : String)

action setter

action?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

action_assigned?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

action_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

action_changed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

action_default

action's default value

Source
action_present?
action_removed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

action_was

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

action_will_change!

Include action in the set of changed attributes, whether it has changed or not.

after_create

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

after_destroy

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

after_initialize(trusted : Bool)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

after_save

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

after_update

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

apply_defaults

Generate code to apply default values

assign_attributes(id : UUID | Missing = Missing, group_id : UUID | Nil | Missing = Missing, user_id : String | Nil | Missing = Missing, email : String | Missing = Missing, action : String | Missing = Missing, resource_type : String | Missing = Missing, resource_id : String | Missing = Missing, changed_fields : Array(String) | Missing = Missing, created_at : Time | Missing = Missing)

Assign to multiple attributes.

assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))

Assign to multiple attributes via HTTP::Params.

assign_attributes(model : PlaceOS::Model::GroupHistory)

Assign to multiple attributes from a model object

assign_attributes_from_json(json, root : String)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

assign_attributes_from_json(json)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

assign_attributes_from_trusted_json(json, root : String)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

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)

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

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

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

before_destroy

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

before_save

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

before_update

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

changed?

Check if any attributes have changed.

changed_attributes

Returns a Hash with all changed attributes.

changed_fields

changed_fields getter

changed_fields=(value : Array(String))

changed_fields setter

changed_fields?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

changed_fields_assigned?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

changed_fields_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

changed_fields_changed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

changed_fields_default

changed_fields's default value

Source
changed_fields_present?
changed_fields_removed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

changed_fields_was

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

changed_fields_will_change!

Include changed_fields in the set of changed attributes, whether it has changed or not.

changed_json(io : IO) : Nil

Serialize the set of changed attributes to JSON.

changed_json

Serialize the set of changed attributes to JSON.

changed_persist_attributes

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

changed_yaml(io : IO) : Nil

Serialize the set of changed attributes to YAML.

changed_yaml

Serialize the set of changed attributes to YAML.

clear_changes_information

Reset changes for all attributes.

created_at

created_at getter

created_at=(value : Time)

created_at setter

created_at?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

created_at_assigned?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

created_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

created_at_changed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

created_at_default

created_at's default value

Source
created_at_present?
created_at_removed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

created_at_was

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

created_at_will_change!

Include created_at in the set of changed attributes, whether it has changed or not.

email

email getter

email=(value : String)

email setter

email?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

email_assigned?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

email_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

email_changed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

email_default

email's default value

Source
email_present?
email_removed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

email_was

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

email_will_change!

Include email in the set of changed attributes, whether it has changed or not.

group_id

group_id getter

group_id=(value : UUID | Nil)

group_id setter

group_id_assigned?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

group_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

group_id_changed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

group_id_default

group_id's default value

Source
group_id_present?
group_id_removed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

group_id_was

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

group_id_will_change!

Include group_id in the set of changed attributes, whether it has changed or not.

id

id getter

id=(value : UUID)

Setters id setter

id?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

id_assigned?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

id_changed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

id_default

id's default value

id_present?
id_removed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

id_was

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

id_will_change!

Include id in the set of changed attributes, whether it has changed or not.

invoke_props

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

persistent_attributes

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

primary_key

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

Source
primary_key_hash

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

resource_id

resource_id getter

resource_id=(value : String)

resource_id setter

resource_id?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

resource_id_assigned?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

resource_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

resource_id_changed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

resource_id_default

resource_id's default value

Source
resource_id_present?
resource_id_removed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

resource_id_was

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

resource_id_will_change!

Include resource_id in the set of changed attributes, whether it has changed or not.

resource_type

resource_type getter

resource_type=(value : String)

resource_type setter

resource_type?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

resource_type_assigned?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

resource_type_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

resource_type_changed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

resource_type_default

resource_type's default value

Source
resource_type_present?
resource_type_removed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

resource_type_was

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

resource_type_will_change!

Include resource_type in the set of changed attributes, whether it has changed or not.

restore_attributes

Reset each attribute to their previous values and clears all changes.

table_name

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

user_deleted?

True once the acting user has been deleted and their reference nulled out. email remains set so the audit trail is still useful.

Source
user_id

user_id getter

user_id=(value : String | Nil)

user_id setter

user_id_assigned?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

user_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

user_id_changed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

user_id_default

user_id's default value

Source
user_id_present?
user_id_removed?

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

user_id_was

Audit trail for changes to Group-system models. Written inside the same transaction as the triggering save/destroy via each model's after-callbacks.

user_id is nullable: it's SET NULL (via the FK) when the acting user is later deleted. email is preserved so the audit trail stays readable even after user deletion.

user_id_will_change!

Include user_id in the set of changed attributes, whether it has changed or not.

validate_nilability

Validate that all non-nillable fields have values.

Nested types