Sha256: 8978bf8868cd8ccfd8438a9cbce7b1ead460450d8d7f14bd71a458898f914c1b
Contents?: true
Size: 474 Bytes
Versions: 1
Compression:
Stored size: 474 Bytes
Contents
class Comment < ActiveRecord::Base if defined?(Gravtastic) include Gravtastic gravtastic :size => 64 end belongs_to :entry default_scope :order => 'created_at ASC' before_validation :bot_check validates_presence_of :name, :email, :body, :message => 'Required' attr_accessor :nickname private def bot_check unless self.nickname.blank? errors.add(:nickname, 'You shouldn\'t have seen this...') false end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jabe-0.5.9 | app/models/comment.rb |