Class Toy
In: app/models/toy.rb
Parent: ActiveRecord::Base

Toy

Original by:Sysphonic
Authors:MORITA Shintaro
Copyright:Copyright (c) 2007 MORITA Shintaro, Sysphonic. All rights reserved.
License:New BSD License (See LICENSE file)
URL:http://sysphonic.com/

Toy class represents a desktop item.

Note:

*

Methods

Constants

XTYPE_UNKNOWN = nil
XTYPE_ITEM = 'item'
XTYPE_COMMENT = 'comment'
XTYPE_WORKFLOW = 'workflow'
XTYPE_SCHEDULE = 'schedule'
XTYPE_LABEL = 'label'
XTYPE_FOLDER = 'folder'

Public Class methods

self.copy

Copies or creates a Toy instance from the source object of each class.

dst_toy:Destination Toy instance. If nil, creates an instance.
src_obj:Source instance.
return:A Toy instance.

self.get_for_user

Gets Toys (desktop items) of specified User.

user:The target User. If nil, returns empty array.
return:Toys array (desktop items) of specified User.

self.on_desktop?

Gets if specified object is on the desktop or not.

user:Target User.
xtype:xtype-attribute of the object.
target_id:Id of the target object.
return:If specified object is on the desktop or not.

[Validate]