Sha256: b0bb3adc2e185bc01515b0d74acc43a535ee3cf89007e1fb544b4ea5f3ab764d

Contents?: true

Size: 633 Bytes

Versions: 7

Compression:

Stored size: 633 Bytes

Contents

# frozen_string_literal: true

require 'active_record'

module Noticent
  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
end

Version data entries

7 entries across 7 versions & 1 rubygems

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