Ktistec::Model
Constants
logging in this module is related to database query performance.
Constructors
Initializes a new instance.
Specified properties are assigned via setter methods. If a property lacks a setter the property is read-only and cannot be assigned. Non-nilable properties must be assigned.
To allow initialization of multiple models from a single
collection of properties, initialize ignores specified
properties that do not exist on the model. Specify _strict: true to change this behavior to raise an error instead.
Initializes a new instance.
Specified properties are assigned via setter methods. If a property lacks a setter the property is read-only and cannot be assigned. Non-nilable properties must be assigned.
To allow initialization of multiple models from a single
collection of properties, initialize ignores specified
properties that do not exist on the model. Specify _strict: true to change this behavior to raise an error instead.
Instance methods
Bulk assigns properties.
Specified properties are assigned via setter methods. If a property lacks a setter the property is read-only and cannot be assigned.
To allow assignment of multiple models from a single
collection of properties, assign ignores specified
properties that do not exist on the model. Specify _strict: true to change this behavior to raise an error instead.
Bulk assigns properties.
Specified properties are assigned via setter methods. If a property lacks a setter the property is read-only and cannot be assigned.
To allow assignment of multiple models from a single
collection of properties, assign ignores specified
properties that do not exist on the model. Specify _strict: true to change this behavior to raise an error instead.
Reloads the properties from the database.
Only reloads the persistent properties. Does not trigger any side effects. Does not ensure that the instance's state is otherwise valid.
Updates and persists property value.
This method is meant for simple state changes -- it does not
validate model state or run before and after actions! Prefer
assign/save methods.
Macros
Specifies a one-to-one association with another model.
Specifies a one-to-many association with another model.
Specifies a one-to-one association with another model.
Adds a validation to a property on an instance.
validates xyz { "is blank" if xyz.blank? }
Nested types
- Ktistec::Model::Assignable
- Ktistec::Model::Blockable
- Ktistec::Model::ClassMethods
- Ktistec::Model::ColumnError
- Ktistec::Model::Common
- Ktistec::Model::Deletable
- Ktistec::Model::Errors
- Ktistec::Model::Insignificant
- Ktistec::Model::Internal
- Ktistec::Model::Invalid
- Ktistec::Model::Linked
- Ktistec::Model::Node
- Ktistec::Model::NotFound
- Ktistec::Model::Persistent
- Ktistec::Model::Polymorphic
- Ktistec::Model::TypeError
- Ktistec::Model::Undoable