Module | LiveTree::ClassMethods |
In: |
live_tree.rb
|
Sets up this controller to serve data for a LiveTree.
Arguments:
Either one of :model or :model_class must be specified.
If :get_item_name_proc is not specified, the item’s name attribute is used.
This example sets up this controller to serve data for a tree with name family_tree, that uses the person model to get data:
class FamilyController < ApplicationController live_tree :family_tree, :model => :person end
A data retrieval method is created that is named <name>_live_tree_data (e.g. family_tree_live_tree_data)