comment! -> comment

This commit is contained in:
Jose Farias
2024-10-23 19:13:35 -06:00
parent ca85326638
commit e1f03fb8fd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ class CommentsController < ApplicationController
include BubbleScoped, BucketScoped
def create
@bubble.comment! params.require(:comment).expect(:body)
@bubble.comment params.require(:comment).expect(:body)
redirect_to @bubble
end
end
+1 -1
View File
@@ -7,7 +7,7 @@ module Bubble::Commentable
scope :ordered_by_comments, -> { left_joins(:comments).group(:id).order("COUNT(comments.id) DESC") }
end
def comment!(body)
def comment(body)
thread_entries.create! threadable: Comment.new(body: body, bubble: self)
end
end