pull/1166/head
Rick Carlino 2019-04-19 13:35:26 -07:00
parent 9ee2db72d7
commit e3abb4bf6a
1 changed files with 4 additions and 2 deletions

View File

@ -5,10 +5,12 @@ module Alerts
string :problem_tag, in: Alert::PROBLEM_TAGS
end
optional { string :slug }
def execute
Alert.create!(device: device,
problem_tag: problem_tag,
slug: SecureRandom.uuid)
problem_tag: problem_tag,
slug: slug || SecureRandom.uuid)
end
end
end