forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
class
PlaceOS::Model::SignageTemplate
- PlaceOS::Model::SignageTemplate
- PgORM::Base
- ActiveModel::Model
- Reference
- Object
Overview
positions widget plugins over a signage display, changing its layout.
Attached to displays via SignageTemplate::SystemTemplate.
Included Modules
- Neuroplastic
- PgORM::Timestamps
- PlaceOS::Model::History::Tracked
Defined in:
placeos-models/signage_template.crplaceos-models/signage_template/layout.cr
Constant Summary
-
CALLBACKS =
{before_save: [do if (__temp_1440 = @authority) && __temp_1440.new_record? __temp_1440.save self.authority_id = __temp_1440.id.not_nil! end end, do if (__temp_1441 = @background_item) && __temp_1441.new_record? __temp_1441.save self.background_item_id = __temp_1441.id.not_nil! end end, do if (__temp_1447 = @live_template) && __temp_1447.new_record? __temp_1447.save self.live_template_id = __temp_1447.id.not_nil! end end] of Nil, after_save: [] 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: [] of Nil, after_destroy: [do end, do end, do end, :__record_history_destroy__] of Nil} -
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
Log =
::Log.for(self) -
PRIMARY_KEY_TYPES =
{:id => UUID} of Nil => Nil -
macro level key => type
-
PRIMARY_KEYS =
[{:id}] -
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time).
Constructors
-
.from_json(string_or_io : String | IO, trusted : Bool = false) : self
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.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
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.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
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.new(pull : JSON::PullParser)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.new(rs : DB::ResultSet)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.new(created_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, updated_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, id : UUID | ActiveModel::Model::None = ::ActiveModel::Model::None.new, name : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, description : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, tags : Array(String) | ActiveModel::Model::None = ::ActiveModel::Model::None.new, authority_id : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, background_item_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, layouts : Array(PlaceOS::Model::SignageTemplate::Layout) | ActiveModel::Model::None = ::ActiveModel::Model::None.new, full_screen_takeover : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, merge : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approval_requested : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, requested_by_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approved : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approved_by_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approved_by_name : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approved_by_email : PlaceOS::Model::Email | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, live_template_id : UUID | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.new(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
Initialize PlaceOS::Model::SignageTemplate from
HTTP::Params. -
.undelete(resource_id : String) : self
Recreates a deleted record from its latest
deleteentry, keeping its id.
Class Method Summary
-
.attributes : Array(Symbol)
Returns all attribute keys.
- .by_authority_id(id)
- .by_background_item_id(id)
- .by_live_template_id(id)
-
.change_history(resource_id : String)
Entries recorded for the resource, newest first
-
.changefeed_ignored_update_columns : Array(String) | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.changes(id : UUID | Nil = nil) : ChangeFeed
Changefeed at row (if
#idpassed) or whole table level. - .elastic
-
.from_rs(__temp_2602 : DB::ResultSet)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.history_ignored : Array(String)
Fields not recorded, changes to only these fields are not recorded at all
-
.history_redacted : Array(String)
Fields whose values are never recorded
-
.on_error(err : Exception | IO::Error)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.primary_key
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
.table_name
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time).
Instance Method Summary
-
#after_create
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#after_destroy
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#after_initialize(trusted : Bool)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#after_save
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#after_update
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#apply_defaults
Generate code to apply default values
-
#approval_requested : Bool
#approval_requestedgetter -
#approval_requested=(value : Bool)
#approval_requestedsetter -
#approval_requested? : Bool | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#approval_requested_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approval_requested_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
-
#approval_requested_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approval_requested_default : Bool
#approval_requested's default value - #approval_requested_present? : Bool
-
#approval_requested_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approval_requested_was : Bool | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approval_requested_will_change! : Nil
Include
#approval_requestedin the set of changed attributes, whether it has changed or not. -
#approve_draft!(user_model_who_approved : User) : SignageTemplate
promotes this draft onto the approved template it references: copies the display fields, records the approver on the live template and removes the draft — all in a single transaction
-
#approved : Bool
#approvedgetter -
#approved=(value : Bool)
#approvedsetter -
#approved? : Bool | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#approved_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_email : PlaceOS::Model::Email | Nil
#approved_by_emailgetter -
#approved_by_email=(value : PlaceOS::Model::Email | Nil)
#approved_by_emailsetter -
#approved_by_email_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_email_change : Tuple(PlaceOS::Model::Email | Nil | Nil, PlaceOS::Model::Email | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#approved_by_email_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_email_default : PlaceOS::Model::Email | Nil
#approved_by_email's default value - #approved_by_email_present? : Bool
-
#approved_by_email_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_email_was : PlaceOS::Model::Email | Nil | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_email_will_change! : Nil
Include
#approved_by_emailin the set of changed attributes, whether it has changed or not. -
#approved_by_id : String | Nil
#approved_by_idgetter -
#approved_by_id=(value : String | Nil)
#approved_by_idsetter -
#approved_by_id_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_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
-
#approved_by_id_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_id_default : String | Nil
#approved_by_id's default value - #approved_by_id_present? : Bool
-
#approved_by_id_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_id_was : String | Nil | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_id_will_change! : Nil
Include
#approved_by_idin the set of changed attributes, whether it has changed or not. -
#approved_by_name : String | Nil
#approved_by_namegetter -
#approved_by_name=(value : String | Nil)
#approved_by_namesetter -
#approved_by_name_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_name_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
-
#approved_by_name_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_name_default : String | Nil
#approved_by_name's default value - #approved_by_name_present? : Bool
-
#approved_by_name_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_name_was : String | Nil | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_by_name_will_change! : Nil
Include
#approved_by_namein the set of changed attributes, whether it has changed or not. -
#approved_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
-
#approved_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_default : Bool
#approved's default value - #approved_present? : Bool
-
#approved_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_was : Bool | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#approved_will_change! : Nil
Include
#approvedin the set of changed attributes, whether it has changed or not. - #approver=(user)
-
#assign_attributes(created_at : Time | Missing = Missing, updated_at : Time | Missing = Missing, id : UUID | Missing = Missing, name : String | Missing = Missing, description : String | Nil | Missing = Missing, tags : Array(String) | Missing = Missing, authority_id : String | Missing = Missing, background_item_id : String | Nil | Missing = Missing, layouts : Array(PlaceOS::Model::SignageTemplate::Layout) | Missing = Missing, full_screen_takeover : Bool | Missing = Missing, merge : Bool | Missing = Missing, approval_requested : Bool | Missing = Missing, requested_by_id : String | Nil | Missing = Missing, approved : Bool | Missing = Missing, approved_by_id : String | Nil | Missing = Missing, approved_by_name : String | Nil | Missing = Missing, approved_by_email : PlaceOS::Model::Email | Nil | Missing = Missing, live_template_id : UUID | Nil | 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::SignageTemplate)
Assign to multiple attributes from a model object
-
#assign_attributes_from_json(json, root : String)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#assign_attributes_from_json(json)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#assign_attributes_from_trusted_json(json, root : String)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#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)
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#assign_attributes_from_yaml(yaml)
Uses the YAML parser as JSON is valid YAML
-
#attributes
Returns a
Hashof all attribute values -
#attributes_json(io : IO) : Nil
Serialize attributes to JSON, without any other properties
to_jsonmay include, as.from_jsonexpects them. -
#attributes_json(json : JSON::Builder) : Nil
Serialize attributes to JSON, without any other properties
to_jsonmay include, as.from_jsonexpects them. -
#attributes_json : String
Serialize attributes to JSON, without any other properties
to_jsonmay include, as.from_jsonexpects them. -
#attributes_tuple
Returns a
NamedTupleof all attribute values. - #authority : PlaceOS::Model::Authority
- #authority! : PlaceOS::Model::Authority
- #authority=(record : PlaceOS::Model::Authority) : PlaceOS::Model::Authority
- #authority? : PlaceOS::Model::Authority | Nil
-
#authority_id : String
#authority_idgetter -
#authority_id=(value : String)
#authority_idsetter -
#authority_id? : String | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#authority_id_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#authority_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
-
#authority_id_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#authority_id_default : String
#authority_id's default value - #authority_id_present? : Bool
-
#authority_id_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#authority_id_was : String | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#authority_id_will_change! : Nil
Include
#authority_idin the set of changed attributes, whether it has changed or not. - #background_item : PlaceOS::Model::Playlist::Item
- #background_item! : PlaceOS::Model::Playlist::Item
- #background_item=(record : PlaceOS::Model::Playlist::Item) : PlaceOS::Model::Playlist::Item
- #background_item? : PlaceOS::Model::Playlist::Item | Nil
-
#background_item_id : String | Nil
#background_item_idgetter -
#background_item_id=(value : String | Nil)
#background_item_idsetter -
#background_item_id_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#background_item_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
-
#background_item_id_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#background_item_id_default : String | Nil
#background_item_id's default value -
#background_item_id_present? : Bool
optional media item rendered behind the widgets (cleared at the DB level if the item is deleted: ON DELETE SET NULL)
-
#background_item_id_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#background_item_id_was : String | Nil | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#background_item_id_will_change! : Nil
Include
#background_item_idin the set of changed attributes, whether it has changed or not. -
#before_create
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#before_destroy
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#before_save
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#before_update
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). - #build_authority(**attributes) : PlaceOS::Model::Authority
- #build_background_item(**attributes) : PlaceOS::Model::Playlist::Item
- #build_live_template(**attributes) : PlaceOS::Model::SignageTemplate
-
#changed?
Check if any attributes have changed.
-
#changed_attributes
Returns a
Hashwith 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
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#changed_yaml(io : IO) : Nil
Serialize the set of changed attributes to YAML.
-
#changed_yaml : String
Serialize the set of changed attributes to YAML.
-
#changes
Returns a
Hashof changed attributes, mapping each to a{previous, current}tuple. -
#changes_json(io : IO) : Nil
Serialize changed attributes to JSON as
{"attribute": [previous, current]}. -
#changes_json(json : JSON::Builder) : Nil
Serialize changed attributes to JSON as
{"attribute": [previous, current]}. -
#changes_json : String
Serialize changed attributes to JSON as
{"attribute": [previous, current]}. -
#clear_changes_information
Reset changes for all attributes.
- #create_authority(**attributes) : PlaceOS::Model::Authority
- #create_authority!(**attributes) : PlaceOS::Model::Authority
- #create_background_item(**attributes) : PlaceOS::Model::Playlist::Item
- #create_background_item!(**attributes) : PlaceOS::Model::Playlist::Item
- #create_live_template(**attributes) : PlaceOS::Model::SignageTemplate
- #create_live_template!(**attributes) : PlaceOS::Model::SignageTemplate
-
#created_at : Time
#created_atgetter -
#created_at=(value : Time)
Setters
#created_atsetter -
#created_at? : Time | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#created_at_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#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
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#created_at_default : Time
#created_at's default value - #created_at_present? : Bool
-
#created_at_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#created_at_was : Time | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#created_at_will_change! : Nil
Include
#created_atin the set of changed attributes, whether it has changed or not. -
#description : String | Nil
#descriptiongetter -
#description=(value : String | Nil)
#descriptionsetter -
#description_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#description_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
-
#description_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#description_default : String | Nil
#description's default value - #description_present? : Bool
-
#description_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#description_was : String | Nil | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#description_will_change! : Nil
Include
#descriptionin the set of changed attributes, whether it has changed or not. - #draft? : Bool
-
#full_screen_takeover : Bool
#full_screen_takeovergetter -
#full_screen_takeover=(value : Bool)
#full_screen_takeoversetter -
#full_screen_takeover? : Bool | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#full_screen_takeover_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#full_screen_takeover_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
-
#full_screen_takeover_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#full_screen_takeover_default : Bool
#full_screen_takeover's default value - #full_screen_takeover_present? : Bool
-
#full_screen_takeover_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#full_screen_takeover_was : Bool | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#full_screen_takeover_will_change! : Nil
Include
#full_screen_takeoverin the set of changed attributes, whether it has changed or not. -
#history_action : String | Nil
Overrides the action recorded by the next change, e.g.
-
#history_action=(history_action : String | Nil)
Overrides the action recorded by the next change, e.g.
-
#history_metadata : PlaceOS::Model::History::Metadata | Nil
Request details recorded with changes to this record, defaults to
History.current_metadata -
#history_metadata=(history_metadata : PlaceOS::Model::History::Metadata | Nil)
Request details recorded with changes to this record, defaults to
History.current_metadata -
#id : UUID
#idgetter -
#id=(value : UUID)
#idsetter -
#id?
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#id_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#id_change : Tuple(UUID | Nil, UUID | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#id_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#id_default : UUID
#id's default value - #id_present? : Bool
-
#id_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#id_was : UUID | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#id_will_change! : Nil
Include
#idin the set of changed attributes, whether it has changed or not. -
#invoke_props
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#layouts : Array(PlaceOS::Model::SignageTemplate::Layout)
#layoutsgetter -
#layouts=(value : Array(PlaceOS::Model::SignageTemplate::Layout))
#layoutssetter -
#layouts? : Array(PlaceOS::Model::SignageTemplate::Layout) | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#layouts_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#layouts_change : Tuple(Array(PlaceOS::Model::SignageTemplate::Layout) | Nil, Array(PlaceOS::Model::SignageTemplate::Layout) | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#layouts_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#layouts_default : Array(Layout)
#layouts's default value -
#layouts_present? : Bool
widget placements, stored as a JSONB array.
-
#layouts_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#layouts_was : Array(PlaceOS::Model::SignageTemplate::Layout) | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#layouts_will_change! : Nil
Include
#layoutsin the set of changed attributes, whether it has changed or not. - #live_template : PlaceOS::Model::SignageTemplate
- #live_template! : PlaceOS::Model::SignageTemplate
- #live_template=(record : PlaceOS::Model::SignageTemplate) : PlaceOS::Model::SignageTemplate
- #live_template? : PlaceOS::Model::SignageTemplate | Nil
-
#live_template_id : UUID | Nil
#live_template_idgetter -
#live_template_id=(value : UUID | Nil)
#live_template_idsetter -
#live_template_id_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#live_template_id_change : Tuple(UUID | Nil | Nil, UUID | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#live_template_id_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#live_template_id_default : UUID | Nil
#live_template_id's default value -
#live_template_id_present? : Bool
approved templates should not be edited in place, so drafts are separate rows referencing the approved parent they were copied from.
-
#live_template_id_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#live_template_id_was : UUID | Nil | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#live_template_id_will_change! : Nil
Include
#live_template_idin the set of changed attributes, whether it has changed or not. -
#merge : Bool
#mergegetter -
#merge=(value : Bool)
#mergesetter -
#merge? : Bool | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#merge_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#merge_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
-
#merge_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#merge_default : Bool
#merge's default value - #merge_present? : Bool
-
#merge_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#merge_was : Bool | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#merge_will_change! : Nil
Include
#mergein the set of changed attributes, whether it has changed or not. -
#name : String
#namegetter -
#name=(value : String)
#namesetter -
#name? : String | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#name_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#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
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#name_default : String
#name's default value - #name_present? : Bool
-
#name_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#name_was : String | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#name_will_change! : Nil
Include
#namein the set of changed attributes, whether it has changed or not. -
#persistent_attributes
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#primary_key
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#primary_key_hash
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). - #reload_authority : PlaceOS::Model::Authority
- #reload_authority? : PlaceOS::Model::Authority | Nil
- #reload_background_item : PlaceOS::Model::Playlist::Item
- #reload_background_item? : PlaceOS::Model::Playlist::Item | Nil
- #reload_live_template : PlaceOS::Model::SignageTemplate
- #reload_live_template? : PlaceOS::Model::SignageTemplate | Nil
-
#requested_by_id : String | Nil
#requested_by_idgetter -
#requested_by_id=(value : String | Nil)
#requested_by_idsetter -
#requested_by_id_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#requested_by_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
-
#requested_by_id_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#requested_by_id_default : String | Nil
#requested_by_id's default value - #requested_by_id_present? : Bool
-
#requested_by_id_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#requested_by_id_was : String | Nil | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#requested_by_id_will_change! : Nil
Include
#requested_by_idin the set of changed attributes, whether it has changed or not. -
#restore_attributes
Reset each attribute to their previous values and clears all changes.
- #system_templates
- #systems
-
#table_name
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#tags : Array(String)
#tagsgetter -
#tags=(value : Array(String))
#tagssetter -
#tags? : Array(String) | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#tags_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#tags_change : Tuple(Array(String) | Nil, Array(String) | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#tags_changed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#tags_default : Array(String)
#tags's default value - #tags_present? : Bool
-
#tags_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#tags_was : Array(String) | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#tags_will_change! : Nil
Include
#tagsin the set of changed attributes, whether it has changed or not. -
#updated_at : Time
#updated_atgetter -
#updated_at=(value : Time)
#updated_atsetter -
#updated_at? : Time | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#updated_at_assigned? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#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
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#updated_at_default : Time
#updated_at's default value - #updated_at_present? : Bool
-
#updated_at_removed? : Bool
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#updated_at_was : Time | Nil
forward declare so this file can be required before signage_template.cr finishes defining the parent class (the
attribute layouts : Array(Layout)line needs Layout resolved at macro-expansion time). -
#updated_at_will_change! : Nil
Include
#updated_atin the set of changed attributes, whether it has changed or not. -
#validate_nilability
Validate that all non-nillable fields have values.
- #zones
Instance methods inherited from module PlaceOS::Model::History::Tracked
change_history
change_history,
history_correlation_id : String | Nil
history_correlation_id,
history_resource_id : String
history_resource_id
Macros inherited from module PlaceOS::Model::History::Tracked
history_ignore(*fields)
history_ignore,
history_redact(*fields)
history_redact
Constructor Detail
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
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">
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Serialize from a trusted JSON source
Serialize from a trusted YAML source
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Initialize PlaceOS::Model::SignageTemplate from HTTP::Params.
Recreates a deleted record from its latest delete entry, keeping its id.
Records removed alongside it (cascading deletes) are not restored and redacted fields are left at their defaults. Raises if there is no delete entry or the record can't be saved, e.g. if it already exists.
Class Method Detail
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Fields not recorded, changes to only these fields are not recorded at all
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Instance Method Detail
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #approval_requested in the set of changed attributes, whether it has changed or not.
promotes this draft onto the approved template it references: copies the display fields, records the approver on the live template and removes the draft — all in a single transaction
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #approved_by_email in the set of changed attributes, whether it has changed or not.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #approved_by_id in the set of changed attributes, whether it has changed or not.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #approved_by_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
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #approved in the set of changed attributes, whether it has changed or not.
Assign to multiple attributes.
Assign to multiple attributes via HTTP::Params.
Assign to multiple attributes from a model object
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Assign each field from JSON if field exists in JSON and has changed in model
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Serialize attributes to JSON, without any other properties to_json may
include, as .from_json expects them.
Values are serialized as in to_json, applying any attribute converters.
Serialize attributes to JSON, without any other properties to_json may
include, as .from_json expects them.
Values are serialized as in to_json, applying any attribute converters.
Serialize attributes to JSON, without any other properties to_json may
include, as .from_json expects them.
Values are serialized as in to_json, applying any attribute converters.
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #authority_id in the set of changed attributes, whether it has changed or not.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
optional media item rendered behind the widgets (cleared at the DB level if the item is deleted: ON DELETE SET NULL)
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #background_item_id in the set of changed attributes, whether it has changed or not.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Serialize changed attributes to JSON as {"attribute": [previous, current]}.
Values are serialized as in to_json, applying any attribute converters.
Serialize changed attributes to JSON as {"attribute": [previous, current]}.
Values are serialized as in to_json, applying any attribute converters.
Serialize changed attributes to JSON as {"attribute": [previous, current]}.
Values are serialized as in to_json, applying any attribute converters.
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #created_at in the set of changed attributes, whether it has changed or not.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #description in the set of changed attributes, whether it has changed or not.
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #full_screen_takeover in the set of changed attributes, whether it has changed or not.
Overrides the action recorded by the next change, e.g. approve
Request details recorded with changes to this record, defaults to
History.current_metadata
Request details recorded with changes to this record, defaults to
History.current_metadata
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #id in the set of changed attributes, whether it has changed or not.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #layouts in the set of changed attributes, whether it has changed or not.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
approved templates should not be edited in place, so drafts are separate rows referencing the approved parent they were copied from. Drafts are removed at the DB level when the parent is deleted (ON DELETE CASCADE)
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #live_template_id in the set of changed attributes, whether it has changed or not.
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #merge in the set of changed attributes, whether it has changed or not.
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #name in the set of changed attributes, whether it has changed or not.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #requested_by_id in the set of changed attributes, whether it has changed or not.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #tags in the set of changed attributes, whether it has changed or not.
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.
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Returns a Tuple of the previous and the current value of an instance variable if it has changed
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
forward declare so this file can be required before signage_template.cr
finishes defining the parent class (the attribute layouts : Array(Layout)
line needs Layout resolved at macro-expansion time).
Include #updated_at in the set of changed attributes, whether it has changed or not.