Sha256: 6f1e00f909429bb69ca344603a9190b071e7261599b18cba08d914ebf5a5e1f8
Contents?: true
Size: 525 Bytes
Versions: 41
Compression:
Stored size: 525 Bytes
Contents
class Comment < ActiveRecord::Base belongs_to :commentable, :polymorphic => true acts_as_textiled :body => [:hard_breaks, :filter_html, :filter_styles] validates_presence_of :name, :comment validates_acceptance_of :spam_filter, :accept => true, :on => :create, :allow_nil => false, :message => "believes message to be spam." validates_format_of :email, :with => %r{.+@.+\..+} attr_accessor :spam_filter def website=(url) write_attribute :website, url.gsub(/^http\:\/\//, '') unless url.blank? end end
Version data entries
41 entries across 41 versions & 1 rubygems