class CustomerMessage < ActiveRecord::Base belongs_to :need belongs_to :expediteur, :class_name => "Customer" belongs_to :destinataire, :class_name => "Customer" validates :message, :presence => true acts_as_tree belongs_to :conversation attr_accessor :thing_type, :thing_id def not_blocked true end end