From ca85326638146a185d87b4c792d0910ad46f747c Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Wed, 23 Oct 2024 19:07:48 -0600 Subject: [PATCH] Simplify `Bubble#comment!` --- app/models/bubble/commentable.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/models/bubble/commentable.rb b/app/models/bubble/commentable.rb index 5e18a49aa..dce3f8602 100644 --- a/app/models/bubble/commentable.rb +++ b/app/models/bubble/commentable.rb @@ -8,9 +8,6 @@ module Bubble::Commentable end def comment!(body) - transaction do - comment = comments.create! body: body - thread_entries.create! threadable: comment - end + thread_entries.create! threadable: Comment.new(body: body, bubble: self) end end