2014-09-02 18:07:02 +05:30
|
|
|
# == Notifiable concern
|
|
|
|
#
|
2015-04-26 12:48:37 +05:30
|
|
|
# Contains notification functionality
|
2014-09-02 18:07:02 +05:30
|
|
|
#
|
|
|
|
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
|