Module LiveTree
In: live_tree.rb
Version:0.1.2
Author:Emanuel Borsboom (www.epiphyte.ca/)
Copyright:Copyright © 2005-2006 Emanuel Borsboom
License:MIT (see LICENSE)

See README for general information about LiveTree.

Methods

Classes and Modules

Module LiveTree::ClassMethods
Module LiveTree::LiveTreeHelper

Public Instance methods

Renders data in JSON notation to return to a LiveTree data request.

Arguments:

  • item - Item to return.
  • options - May contain the following:
    • :get_item_id_proc - Proc object which, when called with an item, returns the id of the item to display. (by default, the item’s name is retrieved using the object’s id attribute).
    • :get_item_name_proc - Proc object which, when called with an item, returns the name of the item to display. (by default, the item’s name is retrieved using the object’s name attribute).
    • :get_item_children_proc - Proc object which, when called with an item, returns the item’s children. (by default, the item’s children are retrieved using the object’s children attribute).
    • :get_item_parent_proc - Proc object which, when called with an item, returns the item’s parent. (by default, the item’s parent is retrieved using the object’s parent attribute).

Returns the value of the item ID from the request’s params.

[Validate]