Gears on Rails API
ERb Tags
online_status_tag
Prints a status message indicating whether the application is online or offline.
Controller JavaScript
find_local(id)
Executes a local find operation for the current model. find_local operates with three different retrieval approaches:
- Find by id: Returns a single record whose id matches the specified id, or null if no record is found.
- Find first: Returns the first record in the database, or null if no record is found.
- Find all: Returns all the records in the database, or an empty array if no records are found.
Examples:
Post.find_local(1);
Post.find_local('first');
Post.find_local('all');