gitlab-org--gitlab-foss/app/models/concerns/notifiable.rb
Dmitriy Zaporozhets f3cbbfe020 Notifiable concern
2013-06-21 23:17:41 +03:00

15 lines
366 B
Ruby

# == 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