Class Comment
In: app/models/comment.rb
Parent: ActiveRecord::Base

Comment

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/

Comment represents each response to an Item, and has partly different means by Item‘s type(=Item.xtype).

Note:

*

Methods

Constants

XTYPE_MSG = 'msg'
XTYPE_ACK = 'ack'
XTYPE_NAK = 'nak'
XTYPE_APPLY = 'apply'
XTYPE_NAMES = { XTYPE_MSG => _('Message'), XTYPE_ACK => _('Acknowledgment'), XTYPE_NAK => _('No Acknowledgment'), XTYPE_APPLY => _('Application'), }

Public Class methods

self.get_list_sql

Gets SQL for list of some latest Comments.

user:Target User.
return:SQL to get list.

self.get_rss

Gets RSS feed of specified User.

maker:The RSS maker.
user:Target User.
root_url:Root URL.

self.get_toys

Gets Toys (desktop items) of specified User.

user:Target User.
return:Toys (desktop items) of specified User.

Public Instance methods

get_xtype_name

Gets String which represents xtype of the Comment.

return:String which represents xtype of the Comment.

[Validate]