Simplify Bubble#comment!

This commit is contained in:
Jose Farias
2024-10-23 19:07:48 -06:00
parent a0c1c7d0ed
commit ca85326638
+1 -4
View File
@@ -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