When hovering over an ActiveRecord model, we show a schema consisting of the field names and types. It could be useful to also indicate the primary key, e.g. with a (PK) suffix.
To check which field is the primary key, we can call .primary_key on the model class.
When hovering over an ActiveRecord model, we show a schema consisting of the field names and types. It could be useful to also indicate the primary key, e.g. with a
(PK)
suffix.To check which field is the primary key, we can call
.primary_key
on the model class.