gitlab-org--gitlab-foss/app/models/concerns/notifiable.rb
Dmitriy Zaporozhets c69b8e0459
Huge replace of old users_project and users_group references
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-14 19:32:51 +03:00

15 lines
323 B
Ruby

# == Notifiable concern
#
# Contains notification functionality
#
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