Class Message
In: generators/messageable/templates/models/message.rb
Parent: ActiveRecord::Base

Methods

clean   deliver   on_deliver  

Public Class methods

sets the on_deliver_callback to the passed method. The method call should expect 2 params (message, mailbox_type).

Public Instance methods

delivers a message to the the given mailbox of all recipients, calls the on_deliver_callback if initialized.

params:

mailbox_type:the mailbox to send the message to
clean:calls the clean method if this is set (must be implemented)

Protected Instance methods

[empty method]

this gets called when a message is delivered and the clean param is set (default). Implement this if you wish to clean out illegal content such as scripts or anything that will break layout. This is left empty because what is considered illegal content varies.

[Validate]