Class: RuleVersionTag
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- RuleVersionTag
- Defined in:
- lib/generators/decision_agent/install/templates/rule_version_tag.rb
Overview
Stores named tags that point to a specific RuleVersion. A tag is a mutable pointer (re-pointing updates the existing row) but the content of the target version is immutable.
version_id is stored as a plain integer without a foreign-key constraint so that tags survive the deletion of the version they originally pointed to.
Instance Method Summary collapse
-
#version ⇒ Object
Resolve the version this tag currently points to.
Instance Method Details
#version ⇒ Object
Resolve the version this tag currently points to. Returns nil if the version has been deleted.
20 21 22 |
# File 'lib/generators/decision_agent/install/templates/rule_version_tag.rb', line 20 def version RuleVersion.find_by(id: version_id) end |