Sha256: 0478596dccd841e5cbd96dcaf1f2d67075b14dc06f2d57f0eea3f12a973333c0
Contents?: true
Size: 331 Bytes
Versions: 13
Compression:
Stored size: 331 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 def list(object) self.where(:commentable_id => object.id, :commentable_type => object.class) end end
Version data entries
13 entries across 13 versions & 1 rubygems