Use guard clause
This commit is contained in:
parent
13be41c844
commit
ce436c6f01
1 changed files with 3 additions and 4 deletions
|
@ -23,10 +23,9 @@ module Cti
|
||||||
o_id: data[:o_id],
|
o_id: data[:o_id],
|
||||||
user_id: data[:user_id],
|
user_id: data[:user_id],
|
||||||
)
|
)
|
||||||
if record.new_record?
|
return if !record.new_record?
|
||||||
record.comment = data[:comment]
|
record.comment = data[:comment]
|
||||||
record.save!
|
record.save!
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
Loading…
Reference in a new issue