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],
|
||||
user_id: data[:user_id],
|
||||
)
|
||||
if record.new_record?
|
||||
record.comment = data[:comment]
|
||||
record.save!
|
||||
end
|
||||
return if !record.new_record?
|
||||
record.comment = data[:comment]
|
||||
record.save!
|
||||
end
|
||||
|
||||
=begin
|
||||
|
|
Loading…
Reference in a new issue