Sha256: 070b62c91bc75341022335be210632f75c3b983b5ab81453bf24de7e95fb679b

Contents?: true

Size: 568 Bytes

Versions: 7

Compression:

Stored size: 568 Bytes

Contents

# frozen_string_literal: true

class OptIn < ActiveRecord::Base
  # scope: is the type of domain object that opt-in applies to. For example
  # it could be post or comment
  # entity_id: is the ID of the scope (post id or comment id)
  # channel_name: is the name of the channel opted into. email or slack are examples
  # alert_name: is the name of the alert: new_user or comment_posted
  # user_id: is the name of the user who's opted into this

  self.table_name = :opt_ins

  validates_presence_of :scope, :entity_id, :channel_name, :alert_name, :recipient_id
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
noticent-0.0.6 lib/generators/noticent/templates/opt_in.rb
noticent-0.0.5 lib/generators/noticent/templates/opt_in.rb
noticent-0.0.4 lib/generators/noticent/templates/opt_in.rb
noticent-0.0.3 lib/generators/noticent/templates/opt_in.rb
noticent-0.0.2 lib/generators/noticent/templates/opt_in.rb
noticent-0.0.1 lib/generators/noticent/templates/opt_in.rb
noticent-0.0.1.pre.pre lib/generators/noticent/templates/opt_in.rb