def action_in_notifier_actions
      unless notifier && notifier.notifiable_actions.include?(self.action)
        errors.add(:action, :not_in_notifiable_actions)
        return false
      end

      return true
    end
def action_in_notifier_actions
      unless notifier && notifier.notifiable_actions.include?(self.action)
        errors.add(:action, :not_in_notifiable_actions)
        return false
      end

      return true
    end
Private: Ensure that the configured action is within the
 actions recorded against the notifier.

 For example, an Issue may notify actions such as:
 * created
 * closed

 While a Project may only notify creating and updating actions

 Returns true if the action is valid, or false if not