November 2018
Intermediate to advanced
404 pages
10h 16m
English
If you want to retrieve only a specified object, use the find() function:
JournalItem.find(id: 1) { result, error in ...}
The find() function expects the explicit id parameter. Since you do not know each record's ID (IDs are created automatically), you rely on the existing links for each record that are ready populated with the IDs to help retrieve the specific record you are looking for. You can find a similar technique used in the implementation of the Edit and Remove route handlers.
Read now
Unlock full access