Class: ActivityNotification::Config
- Inherits:
-
Object
- Object
- ActivityNotification::Config
- Defined in:
- lib/activity_notification/config.rb
Overview
Class used to initialize configuration object.
Instance Attribute Summary collapse
- #action_cable_api_enabled ⇒ Object
- #action_cable_enabled ⇒ Object
- #action_cable_with_devise ⇒ Object
- #active_job_queue ⇒ Object
- #composite_key_delimiter ⇒ Object
- #email_enabled ⇒ Object
- #enabled ⇒ Object
- #mailer ⇒ Object
- #mailer_sender ⇒ Object
- #mailer_templates_dir ⇒ Object
- #notification_api_channel_prefix ⇒ Object
- #notification_channel_prefix ⇒ Object
- #notification_table_name ⇒ Object
- #opened_index_limit ⇒ Object
-
# ⇒ Boolean
Returns ORM name for ActivityNotification (:active_record, :mongoid or :dynamodb).
- #parent_channel ⇒ Object
- #parent_controller ⇒ Object
- #parent_job ⇒ Object
- #parent_mailer ⇒ Object
-
#store_with_associated_records ⇒ Boolean
Returns whether activity_notification stores notificaion records including associated records like target and notifiable.
- #subscribe_as_default ⇒ Object
- #subscription_enabled ⇒ Object
- #subscription_table_name ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
Initialize configuration for ActivityNotification.
Constructor Details
#initialize ⇒ Config
Initialize configuration for ActivityNotification. These configuration can be overridden in initializer.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/activity_notification/config.rb', line 207 def initialize @enabled = true @orm = :active_record @notification_table_name = 'notifications' @subscription_table_name = 'subscriptions' @email_enabled = false @subscription_enabled = false @subscribe_as_default = true @mailer_sender = nil @mailer = 'ActivityNotification::Mailer' @parent_mailer = 'ActionMailer::Base' @parent_job = 'ActiveJob::Base' @parent_controller = 'ApplicationController' @parent_channel = 'ActionCable::Channel::Base' @mailer_templates_dir = 'activity_notification/mailer' @opened_index_limit = 10 @active_job_queue = :activity_notification @composite_key_delimiter = '#' @store_with_associated_records = false @action_cable_enabled = false @action_cable_api_enabled = false @action_cable_with_devise = false @notification_channel_prefix = 'activity_notification_channel' @notification_api_channel_prefix = 'activity_notification_api_channel' end |
Instance Attribute Details
#action_cable_api_enabled ⇒ Boolean #action_cable_api_enabled=(value) ⇒ Boolean
175 176 177 |
# File 'lib/activity_notification/config.rb', line 175 def action_cable_api_enabled @action_cable_api_enabled end |
#action_cable_enabled ⇒ Boolean #action_cable_enabled=(value) ⇒ Boolean
166 167 168 |
# File 'lib/activity_notification/config.rb', line 166 def action_cable_enabled @action_cable_enabled end |
#action_cable_with_devise ⇒ Boolean #action_cable_with_devise=(value) ⇒ Boolean
184 185 186 |
# File 'lib/activity_notification/config.rb', line 184 def action_cable_with_devise @action_cable_with_devise end |
#active_job_queue ⇒ Symbol #active_job_queue=(value) ⇒ Symbol
143 144 145 |
# File 'lib/activity_notification/config.rb', line 143 def active_job_queue @active_job_queue end |
#composite_key_delimiter ⇒ String #composite_key_delimiter=(value) ⇒ Symbol
152 153 154 |
# File 'lib/activity_notification/config.rb', line 152 def composite_key_delimiter @composite_key_delimiter end |
#email_enabled ⇒ Boolean #email_enabled=(value) ⇒ Boolean
44 45 46 |
# File 'lib/activity_notification/config.rb', line 44 def email_enabled @email_enabled end |
#enabled ⇒ Boolean #enabled=(value) ⇒ Boolean
17 18 19 |
# File 'lib/activity_notification/config.rb', line 17 def enabled @enabled end |
#mailer ⇒ String #mailer=(value) ⇒ String
80 81 82 |
# File 'lib/activity_notification/config.rb', line 80 def mailer @mailer end |
#mailer_sender ⇒ String #mailer_sender=(value) ⇒ String
71 72 73 |
# File 'lib/activity_notification/config.rb', line 71 def mailer_sender @mailer_sender end |
#mailer_templates_dir ⇒ String #mailer_templates_dir=(value) ⇒ String
125 126 127 |
# File 'lib/activity_notification/config.rb', line 125 def mailer_templates_dir @mailer_templates_dir end |
#notification_api_channel_prefix ⇒ String #notification_api_channel_prefix=(value) ⇒ String
202 203 204 |
# File 'lib/activity_notification/config.rb', line 202 def notification_api_channel_prefix @notification_api_channel_prefix end |
#notification_channel_prefix ⇒ String #notification_channel_prefix=(value) ⇒ String
193 194 195 |
# File 'lib/activity_notification/config.rb', line 193 def notification_channel_prefix @notification_channel_prefix end |
#notification_table_name ⇒ String #notification_table_name=(value) ⇒ String
26 27 28 |
# File 'lib/activity_notification/config.rb', line 26 def notification_table_name @notification_table_name end |
#opened_index_limit ⇒ Integer #opened_index_limit=(value) ⇒ Integer
134 135 136 |
# File 'lib/activity_notification/config.rb', line 134 def opened_index_limit @opened_index_limit end |
# ⇒ Boolean
8 9 10 |
# File 'lib/activity_notification/config.rb', line 8 def orm @orm end |
#parent_channel ⇒ String #parent_channel=(value) ⇒ String
116 117 118 |
# File 'lib/activity_notification/config.rb', line 116 def parent_channel @parent_channel end |
#parent_controller ⇒ String #parent_controller=(value) ⇒ String
107 108 109 |
# File 'lib/activity_notification/config.rb', line 107 def parent_controller @parent_controller end |
#parent_job ⇒ String #parent_job=(value) ⇒ String
98 99 100 |
# File 'lib/activity_notification/config.rb', line 98 def parent_job @parent_job end |
#parent_mailer ⇒ String #parent_mailer=(value) ⇒ String
89 90 91 |
# File 'lib/activity_notification/config.rb', line 89 def parent_mailer @parent_mailer end |
#store_with_associated_records ⇒ Boolean
157 158 159 |
# File 'lib/activity_notification/config.rb', line 157 def store_with_associated_records @store_with_associated_records end |
#subscribe_as_default ⇒ Boolean #default_subscription=(value) ⇒ Boolean
62 63 64 |
# File 'lib/activity_notification/config.rb', line 62 def subscribe_as_default @subscribe_as_default end |
#subscription_enabled ⇒ Boolean #subscription_enabled=(value) ⇒ Boolean
53 54 55 |
# File 'lib/activity_notification/config.rb', line 53 def subscription_enabled @subscription_enabled end |