Module: UserNotification::Deactivatable

Extended by:
ActiveSupport::Concern
Defined in:
lib/user_notification/roles/deactivatable.rb

Overview

Enables per-class disabling of UserNotification functionality.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#user_notification_enabled?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns true if UserNotification is enabled globally and for this class. overrides the method from Common

Returns:

  • (Boolean)

Since:

  • 0.5.0



17
18
19
# File 'lib/user_notification/roles/deactivatable.rb', line 17

def user_notification_enabled?
  UserNotification.enabled? && self.class.user_notification_enabled_for_model
end