Skip to content
Extraits de code Groupes Projets
Valider 80b81c1a rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

comment now validates presence of text. also, removed unused method overriding ==.

parent 18cd4b85
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -18,10 +18,8 @@ class Comment
key :person_id, ObjectId
belongs_to :person, :class_name => "Person"
def ==(other)
(self.message == other.message) && (self.person.email == other.person.email)
end
validates_presence_of :text
def push_upstream
push_to([post.person])
......@@ -34,7 +32,6 @@ class Comment
#ENCRYPTION
before_validation :sign_if_mine, :sign_if_my_post
#validates_true_for :creator_signature, :logic => lambda {self.verify_creator_signature}
validates_true_for :post_creator_signature, :logic => lambda {self.verify_post_creator_signature}
xml_accessor :creator_signature
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter