method
test_to_key
rails latest stable - Class:
ActiveModel::Lint::Tests
test_to_key()public
Passes if the object’s model responds to to_key and if calling this method returns nil when the object is not persisted. Fails otherwise.
to_key returns an Enumerable of all (primary) key attributes of the model, and is used to a generate unique DOM id for the object.