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

Version Path
forge-cli-0.0.18 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.17 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.16 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.15 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.14 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.13 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.12 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.11 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.10 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.9 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.8 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.7 lib/forge/app/models/comment_subscriber.rb
forge-cli-0.0.6 lib/forge/app/models/comment_subscriber.rb