Notifiable concern
This commit is contained in:
parent
f060645119
commit
f3cbbfe020
|
@ -0,0 +1,15 @@
|
|||
# == Notifiable concern
|
||||
#
|
||||
# Contains notification functionality shared between UsersProject and UsersGroup
|
||||
#
|
||||
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
|
Loading…
Reference in New Issue