gitlabhq/gitlabhq

View on GitHub
app/models/concerns/notifiable.rb

Summary

Maintainability
A
0 mins
Test Coverage
# == Notifiable concern
#
# Contains notification functionality shared between UsersProject and UsersGroup
#
module Notifiable
  extend ActiveSupport::Concern

  included do
    validates :notification_level, inclusion: { in: Notification.project_notification_levels }, presence: true
  end

  def notification
    @notification ||= Notification.new(self)
  end
end