Sha256: 04ec369ed517a1f2018475511a7003336fa50713b491e84cd7861d4afb39a27f

Contents?: true

Size: 453 Bytes

Versions: 13

Compression:

Stored size: 453 Bytes

Contents

class Almanac::Comment < ActiveRecord::Base
  include Rakismet::Model

  belongs_to :post

  attr_accessible :body, :author_email, :author_name, :post_id

  validates_presence_of :author_name
  validates_presence_of :author_email
  validates_presence_of :post
  validates_presence_of :body

  rakismet_attrs :author => :author_name, :author_email => :author_email

  default_scope order('id ASC')

  def self.spam
    self.where(:spam => true)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
almanac-0.8.0 app/models/almanac/comment.rb
almanac-0.7.4 app/models/almanac/comment.rb
almanac-0.7.3 app/models/almanac/comment.rb
almanac-0.7.2 app/models/almanac/comment.rb
almanac-0.7.1 app/models/almanac/comment.rb
almanac-0.6.1 app/models/almanac/comment.rb
almanac-0.6.0 app/models/almanac/comment.rb
almanac-0.5.3 app/models/almanac/comment.rb
almanac-0.5.2 app/models/almanac/comment.rb
almanac-0.5.1 app/models/almanac/comment.rb
almanac-0.5.0 app/models/almanac/comment.rb
almanac-0.4.5 app/models/almanac/comment.rb
almanac-0.4.4 app/models/almanac/comment.rb