comment now validates presence of text. also, removed unused method overriding ==.
This commit is contained in:
parent
18cd4b858a
commit
80b81c1ae1
1 changed files with 2 additions and 5 deletions
|
|
@ -18,10 +18,8 @@ class Comment
|
||||||
|
|
||||||
key :person_id, ObjectId
|
key :person_id, ObjectId
|
||||||
belongs_to :person, :class_name => "Person"
|
belongs_to :person, :class_name => "Person"
|
||||||
|
|
||||||
def ==(other)
|
validates_presence_of :text
|
||||||
(self.message == other.message) && (self.person.email == other.person.email)
|
|
||||||
end
|
|
||||||
|
|
||||||
def push_upstream
|
def push_upstream
|
||||||
push_to([post.person])
|
push_to([post.person])
|
||||||
|
|
@ -34,7 +32,6 @@ class Comment
|
||||||
#ENCRYPTION
|
#ENCRYPTION
|
||||||
|
|
||||||
before_validation :sign_if_mine, :sign_if_my_post
|
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}
|
validates_true_for :post_creator_signature, :logic => lambda {self.verify_post_creator_signature}
|
||||||
|
|
||||||
xml_accessor :creator_signature
|
xml_accessor :creator_signature
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue