Sha256: 38488d9a1746d15a13b69c1d4dfb27bfc846cb81216e3ec842bd3aeffeab02e1
Contents?: true
Size: 559 Bytes
Versions: 4
Compression:
Stored size: 559 Bytes
Contents
class Comment < ActiveRecord::Base belongs_to :commentable, :polymorphic => true acts_as_textiled :body => [:hard_breaks, :filter_html, :filter_styles] if respond_to?(:acts_as_textiled) 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
beef-articles-0.5.3 | app/models/comment.rb |
beef-articles-0.5.2 | app/models/comment.rb |
beef-articles-0.5.1 | app/models/comment.rb |
beef-articles-0.4.18 | app/models/comment.rb |