• E
    Fix inspect with non-primary key id attribute · 65cd0fda
    Eugene Kenny 提交于
    The `read_attribute` method always returns the primary key when asked to
    read the `id` attribute, even if the primary key isn't named `id`, and
    even if another attribute named `id` exists.
    
    For the `inspect`, `attribute_for_inspect` and `pretty_print` methods,
    this behaviour is undesirable, as they're used to examine the internal
    state of the record. By using `_read_attribute` instead, we'll get the
    real value of the `id` attribute.
    65cd0fda
topic.rb 3.4 KB