Sha256: 7b1e15f34d9e1b70e01247ed637ec2e07c20686a4ad8433e3565654fa2ce46f3
Contents?: true
Size: 392 Bytes
Versions: 11
Compression:
Stored size: 392 Bytes
Contents
class CommentSubscriber < ActiveRecord::Base validates_presence_of :email, :commentable validates_uniqueness_of :email, :scope => [:commentable_id, :commentable_type] belongs_to :commentable, :polymorphic => true # open up everything for mass assignment attr_protected def list(object) self.where(:commentable_id => object.id, :commentable_type => object.class) end end
Version data entries
11 entries across 11 versions & 1 rubygems