My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
GearsOnRailsAPI  
Developer Documentation for the Gears on Rails plug-in
Phase-Implementation, Featured
Updated May 6, 2008 by michael....@gmail.com

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');

Sign in to add a comment
Powered by Google Project Hosting