Module: Massive::Notifications
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#notifier ⇒ Object
17 18 19 |
# File 'lib/massive/notifications.rb', line 17 def notifier @notifier ||= self.class.notifier_class.new(notifier_id, self.class.) end |
#notifier_id ⇒ Object
21 22 23 |
# File 'lib/massive/notifications.rb', line 21 def notifier_id "#{self.class.name.underscore.gsub('/', '-')}-#{id}" end |
#notify(message) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/massive/notifications.rb', line 9 def notify() if active_model_serializer notifier.notify() do active_model_serializer.new(reload) end end end |