Skip to content

Instantly share code, notes, and snippets.

@standout
standout / post.rb
Created August 13, 2009 12:56
Super simple spam protection for Ruby on Rails
class Post < ActiveRecord::Base
attr_accessor :comment # fake attribute used for spam trapping
validates_length_of :comment, :in => 0..1
end