class WPDB::Comment
Public Instance Methods
before_validation()
click to toggle source
Calls superclass method
# File lib/ruby-wpdb/comment.rb, line 20 def before_validation self.comment_date ||= Time.now self.comment_date_gmt ||= Time.now.utc self.comment_parent ||= 0 self.comment_approved ||= 1 super end
validate()
click to toggle source
Calls superclass method
# File lib/ruby-wpdb/comment.rb, line 15 def validate super validates_presence [:comment_author, :comment_author_email, :comment_date, :comment_date_gmt, :comment_parent, :comment_approved] end