Sha256: 8cd52b0cd9fcceb887c6a1042505f46f1a52c61827106895476455dbe1a776a5

Contents?: true

Size: 880 Bytes

Versions: 71

Compression:

Stored size: 880 Bytes

Contents

module Sipity
  # A bridge for defining the "contexts" in which emails are sent.
  #
  # When an object enters a new state, we want to be able to define what are
  # the emails that should be sent.
  #
  # In Sipity this could be modeled by defining a NotifiableContext for a
  # WorkflowState and Email.
  #
  # @example
  #   workflow_state = Sipity::WorkflowState.new
  #   notification = Sipity::Notification.new
  #
  #   Sipity::NotifiableContext.new(
  #     scope_for_notification: workflow_state,
  #     reason_for_notification: 'on_enter',
  #     notification: notification
  #   )
  class NotifiableContext < ActiveRecord::Base
    self.table_name = 'sipity_notifiable_contexts'
    belongs_to :scope_for_notification, polymorphic: true
    belongs_to :notification, class_name: 'Sipity::Notification'

    REASON_ACTION_IS_TAKEN = 'action_is_taken'.freeze
  end
end

Version data entries

71 entries across 71 versions & 3 rubygems

Version Path
hyrax-2.9.6 app/models/sipity/notifiable_context.rb
hyrax-2.9.5 app/models/sipity/notifiable_context.rb
hyrax-2.9.4 app/models/sipity/notifiable_context.rb
hyrax-2.9.3 app/models/sipity/notifiable_context.rb
hyrax-2.9.2 app/models/sipity/notifiable_context.rb
hyrax-2.9.1 app/models/sipity/notifiable_context.rb
hyrax-2.9.0 app/models/sipity/notifiable_context.rb
hyrax-2.8.0 app/models/sipity/notifiable_context.rb
hyrax-2.7.2 app/models/sipity/notifiable_context.rb
hyrax-2.7.1 app/models/sipity/notifiable_context.rb
hyrax-2.7.0 app/models/sipity/notifiable_context.rb
hyrax-2.6.0 app/models/sipity/notifiable_context.rb
hyrax-3.0.0.pre.rc1 app/models/sipity/notifiable_context.rb
hyrax-3.0.0.pre.beta3 app/models/sipity/notifiable_context.rb
hyrax-2.5.1 app/models/sipity/notifiable_context.rb
hyrax-2.5.0 app/models/sipity/notifiable_context.rb
hyrax-3.0.0.pre.beta2 app/models/sipity/notifiable_context.rb
hyrax-2.4.1 app/models/sipity/notifiable_context.rb
hyrax-3.0.0.pre.beta1 app/models/sipity/notifiable_context.rb
hyrax-2.4.0 app/models/sipity/notifiable_context.rb