2014-09-02 14:37:02 +02:00
|
|
|
# == Notifiable concern
|
|
|
|
#
|
2015-04-26 09:18:37 +02:00
|
|
|
# Contains notification functionality
|
2014-09-02 14:37:02 +02:00
|
|
|
#
|
|
|
|
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
|