c69b8e0459
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
15 lines
323 B
Ruby
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
|