Sha256: 04e632121029cbd88da4171ea781089ff2c9956625af9e1f9ffe6843a4dbd18f

Contents?: true

Size: 488 Bytes

Versions: 18

Compression:

Stored size: 488 Bytes

Contents

class SpudPostComment < ActiveRecord::Base
  if Spud::Blog.enable_rakismet
    include Rakismet::Model
    before_save :rakismet_check_for_spam
  end


	validates_presence_of :author, :content
	belongs_to :post, :class_name => 'SpudPost', :foreign_key => 'spud_post_id', :counter_cache => :comments_count

	attr_accessible :author,:content,:spud_post_id,:referrer,:spam,:user_agent,:user_ip,:permalink


  def rakismet_check_for_spam
    self.spam = self.spam?
    return true
  end

end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
spud_blog-0.9.11 app/models/spud_post_comment.rb
tb_blog-1.0.2 app/models/spud_post_comment.rb
tb_blog-1.0.1 app/models/spud_post_comment.rb
tb_blog-1.0 app/models/spud_post_comment.rb
spud_blog-0.9.10 app/models/spud_post_comment.rb
spud_blog-0.9.9 app/models/spud_post_comment.rb
spud_blog-0.9.8 app/models/spud_post_comment.rb
spud_blog-0.9.7 app/models/spud_post_comment.rb
spud_blog-0.9.5 app/models/spud_post_comment.rb
spud_blog-0.9.4 app/models/spud_post_comment.rb
spud_blog-0.9.3 app/models/spud_post_comment.rb
spud_blog-0.9.2 app/models/spud_post_comment.rb
spud_blog-0.9.1 app/models/spud_post_comment.rb
spud_blog-0.9.0 app/models/spud_post_comment.rb
spud_blog-0.8.18 app/models/spud_post_comment.rb
spud_blog-0.8.17 app/models/spud_post_comment.rb
spud_blog-0.8.16 app/models/spud_post_comment.rb
spud_blog-0.8.15 app/models/spud_post_comment.rb