Class: Jazari::Anchor
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Jazari::Anchor
- Defined in:
- app/models/jazari/anchor.rb
Overview
A stable relational target for a subject that is not an ActiveRecord row: a JSON-tree node, a file path, a DNS zone, a document. The scope is host-registered; the gem ships no default scope naming any real model.
Class Method Summary collapse
-
.table_name ⇒ Object
Resolved on EVERY call, not assigned at class-definition time.
Class Method Details
.table_name ⇒ Object
Resolved on EVERY call, not assigned at class-definition time.
Assigning it eagerly made the binding depend on load order: under Zeitwerk
a host's configure runs before these constants autoload, so the
assignment never happened and the model silently kept the gem's default
name. A host adopting existing tables then queried tables that do not
exist. Reading config here removes the ordering question entirely.
15 |
# File 'app/models/jazari/anchor.rb', line 15 def self.table_name = Jazari.table_name_for(:anchors) |