2013-06-21 16:17:41 -04:00
|
|
|
# == Notifiable concern
|
|
|
|
#
|
2014-09-14 12:32:51 -04:00
|
|
|
# Contains notification functionality
|
2013-06-21 16:17:41 -04: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
|