activity_notification 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -16
- data/CHANGELOG.md +52 -0
- data/Gemfile +2 -3
- data/README.md +2 -2
- data/activity_notification.gemspec +1 -1
- data/app/channels/activity_notification/notification_api_with_devise_channel.rb +1 -1
- data/app/channels/activity_notification/notification_channel.rb +1 -1
- data/app/channels/activity_notification/notification_with_devise_channel.rb +1 -1
- data/app/controllers/activity_notification/notifications_api_with_devise_controller.rb +1 -1
- data/app/controllers/activity_notification/notifications_controller.rb +0 -20
- data/app/controllers/activity_notification/subscriptions_api_controller.rb +1 -1
- data/app/controllers/activity_notification/subscriptions_api_with_devise_controller.rb +1 -1
- data/bin/bundle_update.sh +0 -1
- data/docs/Functions.md +3 -3
- data/docs/Setup.md +190 -63
- data/gemfiles/Gemfile.rails-5.0 +3 -1
- data/gemfiles/Gemfile.rails-5.1 +3 -1
- data/gemfiles/Gemfile.rails-5.2 +3 -1
- data/gemfiles/Gemfile.rails-6.0 +2 -3
- data/lib/activity_notification.rb +1 -0
- data/lib/activity_notification/apis/notification_api.rb +8 -1
- data/lib/activity_notification/common.rb +15 -4
- data/lib/activity_notification/controllers/common_controller.rb +2 -18
- data/lib/activity_notification/controllers/concerns/swagger/notifications_parameters.rb +2 -2
- data/lib/activity_notification/models/concerns/notifiable.rb +12 -12
- data/lib/activity_notification/models/concerns/swagger/notification_schema.rb +34 -34
- data/lib/activity_notification/models/concerns/swagger/subscription_schema.rb +17 -17
- data/lib/activity_notification/models/concerns/target.rb +5 -9
- data/lib/activity_notification/optional_targets/action_cable_api_channel.rb +1 -1
- data/lib/activity_notification/optional_targets/action_cable_channel.rb +1 -1
- data/lib/activity_notification/orm/active_record.rb +1 -1
- data/lib/activity_notification/orm/active_record/notification.rb +3 -3
- data/lib/activity_notification/orm/dynamoid.rb +10 -3
- data/lib/activity_notification/orm/dynamoid/notification.rb +49 -14
- data/lib/activity_notification/orm/dynamoid/subscription.rb +1 -1
- data/lib/activity_notification/orm/mongoid.rb +10 -3
- data/lib/activity_notification/orm/mongoid/notification.rb +8 -6
- data/lib/activity_notification/orm/mongoid/subscription.rb +1 -1
- data/lib/activity_notification/renderable.rb +2 -2
- data/lib/activity_notification/roles/acts_as_notifiable.rb +13 -16
- data/lib/activity_notification/version.rb +1 -1
- data/lib/generators/templates/migrations/migration.rb +1 -1
- data/spec/channels/notification_api_channel_spec.rb +42 -44
- data/spec/channels/notification_api_with_devise_channel_spec.rb +57 -59
- data/spec/channels/notification_channel_spec.rb +41 -43
- data/spec/channels/notification_with_devise_channel_spec.rb +75 -77
- data/spec/concerns/apis/notification_api_spec.rb +1 -1
- data/spec/concerns/common_spec.rb +25 -3
- data/spec/concerns/models/notifiable_spec.rb +35 -35
- data/spec/concerns/models/target_spec.rb +10 -12
- data/spec/concerns/renderable_spec.rb +5 -5
- data/spec/config_spec.rb +26 -15
- data/spec/controllers/controller_spec_utility.rb +15 -51
- data/spec/generators/migration/migration_generator_spec.rb +2 -10
- data/spec/helpers/view_helpers_spec.rb +1 -1
- data/spec/models/subscription_spec.rb +8 -0
- data/spec/optional_targets/action_cable_api_channel_spec.rb +21 -24
- data/spec/optional_targets/action_cable_channel_spec.rb +26 -29
- data/spec/rails_app/app/controllers/users_controller.rb +5 -0
- data/spec/rails_app/app/javascript/App.vue +8 -72
- data/spec/rails_app/app/javascript/components/DeviseTokenAuth.vue +3 -4
- data/spec/rails_app/app/javascript/components/Top.vue +2 -3
- data/spec/rails_app/app/javascript/packs/spa.js +6 -3
- data/spec/rails_app/app/javascript/router/index.js +73 -0
- data/spec/rails_app/app/javascript/store/{auth.js → index.js} +0 -0
- data/spec/rails_app/app/models/dummy/dummy_group.rb +8 -0
- data/spec/rails_app/app/models/dummy/dummy_notifiable_target.rb +8 -0
- data/spec/rails_app/app/models/user.rb +2 -1
- data/spec/rails_app/config/application.rb +6 -7
- data/spec/rails_app/config/dynamoid.rb +11 -3
- data/spec/rails_app/config/environments/production.rb +3 -0
- data/spec/rails_app/config/environments/test.rb +2 -11
- data/spec/rails_app/config/initializers/activity_notification.rb +3 -3
- data/spec/rails_app/config/initializers/copy_it.aws.rb.template +6 -0
- data/spec/rails_app/config/routes.rb +5 -1
- data/spec/rails_app/db/seeds.rb +9 -2
- data/spec/roles/acts_as_notifiable_spec.rb +5 -5
- data/spec/spec_helper.rb +1 -5
- metadata +11 -10
- data/gemfiles/Gemfile.rails-4.2 +0 -23
- data/spec/support/patch_rails_42_action_controller_test_response.rb +0 -11
data/gemfiles/Gemfile.rails-5.0
CHANGED
@@ -11,13 +11,15 @@ group :development do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
group :test do
|
14
|
+
gem 'rspec-rails', '< 4.0.0'
|
14
15
|
gem 'rails-controller-testing'
|
15
16
|
gem 'action-cable-testing'
|
16
17
|
gem 'ammeter'
|
17
18
|
gem 'timecop'
|
18
19
|
gem 'committee'
|
19
20
|
gem 'committee-rails'
|
20
|
-
gem 'coveralls', require: false
|
21
|
+
# gem 'coveralls', require: false
|
22
|
+
gem 'coveralls_reborn', require: false
|
21
23
|
end
|
22
24
|
|
23
25
|
gem 'dotenv-rails', groups: [:development, :test]
|
data/gemfiles/Gemfile.rails-5.1
CHANGED
@@ -10,13 +10,15 @@ group :development do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
group :test do
|
13
|
+
gem 'rspec-rails', '< 4.0.0'
|
13
14
|
gem 'rails-controller-testing'
|
14
15
|
gem 'action-cable-testing'
|
15
16
|
gem 'ammeter'
|
16
17
|
gem 'timecop'
|
17
18
|
gem 'committee'
|
18
19
|
gem 'committee-rails'
|
19
|
-
gem 'coveralls', require: false
|
20
|
+
# gem 'coveralls', require: false
|
21
|
+
gem 'coveralls_reborn', require: false
|
20
22
|
end
|
21
23
|
|
22
24
|
gem 'dotenv-rails', groups: [:development, :test]
|
data/gemfiles/Gemfile.rails-5.2
CHANGED
@@ -10,13 +10,15 @@ group :development do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
group :test do
|
13
|
+
gem 'rspec-rails', '< 4.0.0'
|
13
14
|
gem 'rails-controller-testing'
|
14
15
|
gem 'action-cable-testing'
|
15
16
|
gem 'ammeter'
|
16
17
|
gem 'timecop'
|
17
18
|
gem 'committee'
|
18
19
|
gem 'committee-rails'
|
19
|
-
gem 'coveralls', require: false
|
20
|
+
# gem 'coveralls', require: false
|
21
|
+
gem 'coveralls_reborn', require: false
|
20
22
|
end
|
21
23
|
|
22
24
|
gem 'dotenv-rails', groups: [:development, :test]
|
data/gemfiles/Gemfile.rails-6.0
CHANGED
@@ -10,14 +10,13 @@ group :development do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
group :test do
|
13
|
-
#TODO https://github.com/rails/rails/issues/35417
|
14
|
-
gem 'rspec-rails', '4.0.0.beta4'
|
15
13
|
gem 'rails-controller-testing'
|
16
14
|
gem 'ammeter'
|
17
15
|
gem 'timecop'
|
18
16
|
gem 'committee'
|
19
17
|
gem 'committee-rails'
|
20
|
-
gem 'coveralls', require: false
|
18
|
+
# gem 'coveralls', require: false
|
19
|
+
gem 'coveralls_reborn', require: false
|
21
20
|
end
|
22
21
|
|
23
22
|
gem 'dotenv-rails', groups: [:development, :test]
|
@@ -454,7 +454,7 @@ module ActivityNotification
|
|
454
454
|
#
|
455
455
|
# @return [Array<Notificaion>] Available options for kinds of notify methods
|
456
456
|
def available_options
|
457
|
-
[:key, :group, :group_expiry_delay, :notifier, :parameters, :send_email, :send_later].freeze
|
457
|
+
[:key, :group, :group_expiry_delay, :notifier, :parameters, :send_email, :send_later, :pass_full_options].freeze
|
458
458
|
end
|
459
459
|
|
460
460
|
# Defines mailer class to send notification
|
@@ -495,16 +495,23 @@ module ActivityNotification
|
|
495
495
|
|
496
496
|
notification = new({ target: target, notifiable: notifiable, key: key, group: group, parameters: parameters, notifier: notifier, group_owner: group_owner })
|
497
497
|
notification.prepare_to_store.save
|
498
|
+
notification.after_store
|
498
499
|
notification
|
499
500
|
end
|
500
501
|
end
|
501
502
|
|
503
|
+
# :nocov:
|
502
504
|
# Returns prepared notification object to store
|
503
505
|
# @return [Object] prepared notification object to store
|
504
506
|
def prepare_to_store
|
505
507
|
self
|
506
508
|
end
|
507
509
|
|
510
|
+
# Call after store action with stored notification
|
511
|
+
def after_store
|
512
|
+
end
|
513
|
+
# :nocov:
|
514
|
+
|
508
515
|
# Sends notification email to the target.
|
509
516
|
#
|
510
517
|
# @param [Hash] options Options for notification email
|
@@ -16,7 +16,11 @@ module ActivityNotification
|
|
16
16
|
when Symbol
|
17
17
|
symbol_method = context.method(thing)
|
18
18
|
if symbol_method.arity > 1
|
19
|
-
|
19
|
+
if args.last.kind_of?(Hash)
|
20
|
+
symbol_method.call(ActivityNotification.get_controller, *args[0...-1], **args[-1])
|
21
|
+
else
|
22
|
+
symbol_method.call(ActivityNotification.get_controller, *args)
|
23
|
+
end
|
20
24
|
elsif symbol_method.arity > 0
|
21
25
|
symbol_method.call(ActivityNotification.get_controller)
|
22
26
|
else
|
@@ -74,7 +78,11 @@ module ActivityNotification
|
|
74
78
|
when Symbol
|
75
79
|
symbol_method = method(thing)
|
76
80
|
if symbol_method.arity > 0
|
77
|
-
|
81
|
+
if args.last.kind_of?(Hash)
|
82
|
+
symbol_method.call(*args[0...-1], **args[-1])
|
83
|
+
else
|
84
|
+
symbol_method.call(*args)
|
85
|
+
end
|
78
86
|
else
|
79
87
|
symbol_method.call
|
80
88
|
end
|
@@ -98,9 +106,12 @@ module ActivityNotification
|
|
98
106
|
end
|
99
107
|
|
100
108
|
# Convets to class name.
|
109
|
+
# This function returns base_class name for STI models if the class responds to base_class method.
|
110
|
+
# @see https://github.com/simukappu/activity_notification/issues/89
|
111
|
+
# @see https://github.com/simukappu/activity_notification/pull/139
|
101
112
|
# @return [String] Class name
|
102
113
|
def to_class_name
|
103
|
-
self.class.name
|
114
|
+
self.class.respond_to?(:base_class) ? self.class.base_class.name : self.class.name
|
104
115
|
end
|
105
116
|
|
106
117
|
# Convets to singularized model name (resource name).
|
@@ -128,4 +139,4 @@ module ActivityNotification
|
|
128
139
|
"#{self.printable_type} (#{id})"
|
129
140
|
end
|
130
141
|
end
|
131
|
-
end
|
142
|
+
end
|
@@ -26,7 +26,7 @@ module ActivityNotification
|
|
26
26
|
target_class = target_type.to_model_class
|
27
27
|
@target = params[:target_id].present? ?
|
28
28
|
target_class.find_by!(id: params[:target_id]) :
|
29
|
-
target_class.find_by!(id: params["#{target_type.to_resource_name}_id"])
|
29
|
+
target_class.find_by!(id: params["#{target_type.to_resource_name[/([^\/]+)$/]}_id"])
|
30
30
|
else
|
31
31
|
render status: 400, json: error_response(code: 400, message: "Invalid parameter", type: "Parameter is missing or the value is empty: target_type")
|
32
32
|
end
|
@@ -130,25 +130,9 @@ module ActivityNotification
|
|
130
130
|
load_index if params[:reload].to_s.to_boolean(true)
|
131
131
|
format.js
|
132
132
|
else
|
133
|
-
|
133
|
+
redirect_back(fallback_location: { action: :index }, **@index_options) and return
|
134
134
|
end
|
135
135
|
end
|
136
136
|
end
|
137
|
-
|
138
|
-
# Redirect to back.
|
139
|
-
# @api protected
|
140
|
-
# @return [Boolean] True
|
141
|
-
def compatibly_redirect_back(request_params = {})
|
142
|
-
# :nocov:
|
143
|
-
if Rails::VERSION::MAJOR >= 5
|
144
|
-
redirect_back fallback_location: { action: :index }, **request_params
|
145
|
-
elsif request.referer
|
146
|
-
redirect_to :back, **request_params
|
147
|
-
else
|
148
|
-
redirect_to action: :index, **request_params
|
149
|
-
end
|
150
|
-
# :nocov:
|
151
|
-
true
|
152
|
-
end
|
153
137
|
end
|
154
138
|
end
|
@@ -75,7 +75,7 @@ module ActivityNotification
|
|
75
75
|
key :required, false
|
76
76
|
key :type, :string
|
77
77
|
key :format, :'date-time'
|
78
|
-
key :example, Time.current.iso8601(3)
|
78
|
+
key :example, Time.current.ago(10.years).iso8601(3)
|
79
79
|
end
|
80
80
|
base.parameter do
|
81
81
|
key :name, :earlier_than
|
@@ -84,7 +84,7 @@ module ActivityNotification
|
|
84
84
|
key :required, false
|
85
85
|
key :type, :string
|
86
86
|
key :format, :'date-time'
|
87
|
-
key :example, Time.current.iso8601(3)
|
87
|
+
key :example, Time.current.since(10.years).iso8601(3)
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
@@ -25,8 +25,8 @@ module ActivityNotification
|
|
25
25
|
:_notifier,
|
26
26
|
:_notification_parameters,
|
27
27
|
:_notification_email_allowed,
|
28
|
-
:
|
29
|
-
:
|
28
|
+
:_notifiable_action_cable_allowed,
|
29
|
+
:_notifiable_action_cable_api_allowed,
|
30
30
|
:_notifiable_path,
|
31
31
|
:_printable_notifiable_name,
|
32
32
|
:_optional_targets
|
@@ -55,8 +55,8 @@ module ActivityNotification
|
|
55
55
|
self._notifier = {}
|
56
56
|
self._notification_parameters = {}
|
57
57
|
self._notification_email_allowed = {}
|
58
|
-
self.
|
59
|
-
self.
|
58
|
+
self._notifiable_action_cable_allowed = {}
|
59
|
+
self._notifiable_action_cable_api_allowed = {}
|
60
60
|
self._notifiable_path = {}
|
61
61
|
self._printable_notifiable_name = {}
|
62
62
|
self._optional_targets = {}
|
@@ -162,10 +162,10 @@ module ActivityNotification
|
|
162
162
|
# @param [Object] target Target instance to notify
|
163
163
|
# @param [String] key Key of the notification
|
164
164
|
# @return [Boolean] If publishing WebSocket using ActionCable is allowed for the notifiable
|
165
|
-
def
|
165
|
+
def notifiable_action_cable_allowed?(target, key = nil)
|
166
166
|
resolve_parameter(
|
167
|
-
"
|
168
|
-
|
167
|
+
"notifiable_action_cable_allowed_for_#{cast_to_resources_name(target.class)}?",
|
168
|
+
_notifiable_action_cable_allowed[cast_to_resources_sym(target.class)],
|
169
169
|
ActivityNotification.config.action_cable_enabled,
|
170
170
|
target, key)
|
171
171
|
end
|
@@ -176,10 +176,10 @@ module ActivityNotification
|
|
176
176
|
# @param [Object] target Target instance to notify
|
177
177
|
# @param [String] key Key of the notification
|
178
178
|
# @return [Boolean] If publishing WebSocket API using ActionCable is allowed for the notifiable
|
179
|
-
def
|
179
|
+
def notifiable_action_cable_api_allowed?(target, key = nil)
|
180
180
|
resolve_parameter(
|
181
|
-
"
|
182
|
-
|
181
|
+
"notifiable_action_cable_api_allowed_for_#{cast_to_resources_name(target.class)}?",
|
182
|
+
_notifiable_action_cable_api_allowed[cast_to_resources_sym(target.class)],
|
183
183
|
ActivityNotification.config.action_cable_api_enabled,
|
184
184
|
target, key)
|
185
185
|
end
|
@@ -456,7 +456,7 @@ module ActivityNotification
|
|
456
456
|
unless generated_notifications.to_a.empty?
|
457
457
|
record = self.class.human_attribute_name("generated_notifications_as_notifiable_for_#{target_type.to_s.pluralize.underscore}").downcase
|
458
458
|
self.errors.add(:base, :'restrict_dependent_destroy.has_many', record: record)
|
459
|
-
|
459
|
+
throw(:abort)
|
460
460
|
end
|
461
461
|
when :destroy
|
462
462
|
generated_notifications.each { |n| n.destroy }
|
@@ -482,7 +482,7 @@ module ActivityNotification
|
|
482
482
|
# Casts to symbol of resources name.
|
483
483
|
# @api private
|
484
484
|
def cast_to_resources_sym(target_type)
|
485
|
-
target_type.
|
485
|
+
cast_to_resources_name(target_type).to_sym
|
486
486
|
end
|
487
487
|
end
|
488
488
|
end
|
@@ -90,7 +90,7 @@ module ActivityNotification
|
|
90
90
|
type: :string
|
91
91
|
}
|
92
92
|
key :example, {
|
93
|
-
|
93
|
+
test_default_param: "1"
|
94
94
|
}
|
95
95
|
end
|
96
96
|
property :opened_at do
|
@@ -139,28 +139,28 @@ module ActivityNotification
|
|
139
139
|
key :type, :object
|
140
140
|
key :description, "Associated target model in your application"
|
141
141
|
key :example, {
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
142
|
+
id: 1,
|
143
|
+
email: "ichiro@example.com",
|
144
|
+
name: "Ichiro",
|
145
|
+
created_at: Time.current,
|
146
|
+
updated_at: Time.current,
|
147
|
+
provider: "email",
|
148
|
+
uid: "",
|
149
|
+
printable_type: "User",
|
150
|
+
printable_target_name: "Ichiro"
|
151
151
|
}
|
152
152
|
end
|
153
153
|
property :notifiable do
|
154
154
|
key :type, :object
|
155
155
|
key :description, "Associated notifiable model in your application"
|
156
156
|
key :example, {
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
157
|
+
id: 22,
|
158
|
+
user_id: 2,
|
159
|
+
article_id: 11,
|
160
|
+
body: "This is the first Stephen's comment to Ichiro's article.",
|
161
|
+
created_at: Time.current,
|
162
|
+
updated_at: Time.current,
|
163
|
+
printable_type: "Comment"
|
164
164
|
}
|
165
165
|
end
|
166
166
|
property :group do
|
@@ -168,14 +168,14 @@ module ActivityNotification
|
|
168
168
|
key :description, "Associated group model in your application"
|
169
169
|
key :nullable, true
|
170
170
|
key :example, {
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
171
|
+
id: 11,
|
172
|
+
user_id: 4,
|
173
|
+
title: "Ichiro's great article",
|
174
|
+
body: "This is Ichiro's great article. Please read it!",
|
175
|
+
created_at: Time.current,
|
176
|
+
updated_at: Time.current,
|
177
|
+
printable_type: "Article",
|
178
|
+
printable_group_name: "article \"Ichiro's great article\""
|
179
179
|
}
|
180
180
|
end
|
181
181
|
property :notifier do
|
@@ -183,15 +183,15 @@ module ActivityNotification
|
|
183
183
|
key :description, "Associated notifier model in your application"
|
184
184
|
key :nullable, true
|
185
185
|
key :example, {
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
186
|
+
id: 2,
|
187
|
+
email: "stephen@example.com",
|
188
|
+
name: "Stephen",
|
189
|
+
created_at: Time.current,
|
190
|
+
updated_at: Time.current,
|
191
|
+
provider: "email",
|
192
|
+
uid: "",
|
193
|
+
printable_type: "User",
|
194
|
+
printable_notifier_name: "Stephen"
|
195
195
|
}
|
196
196
|
end
|
197
197
|
property :group_members do
|
@@ -90,15 +90,15 @@ module ActivityNotification
|
|
90
90
|
}
|
91
91
|
}
|
92
92
|
key :example, {
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
action_cable_channel: {
|
94
|
+
subscribing: true,
|
95
|
+
subscribed_at: Time.current,
|
96
|
+
unsubscribed_at: nil
|
97
97
|
},
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
98
|
+
slack: {
|
99
|
+
subscribing: false,
|
100
|
+
subscribed_at: nil,
|
101
|
+
unsubscribed_at: Time.current
|
102
102
|
}
|
103
103
|
}
|
104
104
|
end
|
@@ -114,11 +114,11 @@ module ActivityNotification
|
|
114
114
|
key :type, :object
|
115
115
|
key :description, "Associated target model in your application"
|
116
116
|
key :example, {
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
id: 1,
|
118
|
+
email: "ichiro@example.com",
|
119
|
+
name: "Ichiro",
|
120
|
+
created_at: Time.current,
|
121
|
+
updated_at: Time.current
|
122
122
|
}
|
123
123
|
end
|
124
124
|
end
|
@@ -145,11 +145,11 @@ module ActivityNotification
|
|
145
145
|
}
|
146
146
|
}
|
147
147
|
key :example, {
|
148
|
-
|
149
|
-
|
148
|
+
action_cable_channel: {
|
149
|
+
subscribing: true
|
150
150
|
},
|
151
|
-
|
152
|
-
|
151
|
+
slack: {
|
152
|
+
subscribing: false
|
153
153
|
}
|
154
154
|
}
|
155
155
|
end
|
@@ -213,16 +213,12 @@ module ActivityNotification
|
|
213
213
|
resolve_value(_notification_action_cable_with_devise)
|
214
214
|
end
|
215
215
|
|
216
|
-
#
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
def notification_action_cable_channel_class_name
|
222
|
-
notification_action_cable_with_devise? ? "ActivityNotification::NotificationWithDeviseChannel" : "ActivityNotification::NotificationChannel"
|
223
|
-
end
|
216
|
+
# Returns notification ActionCable channel class name from action_cable_with_devise? configuration.
|
217
|
+
#
|
218
|
+
# @return [String] Notification ActionCable channel class name from action_cable_with_devise? configuration
|
219
|
+
def notification_action_cable_channel_class_name
|
220
|
+
notification_action_cable_with_devise? ? "ActivityNotification::NotificationWithDeviseChannel" : "ActivityNotification::NotificationChannel"
|
224
221
|
end
|
225
|
-
# :nocov:
|
226
222
|
|
227
223
|
# Returns Devise resource model associated with this target.
|
228
224
|
#
|