diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 052433989..83fbb1e80 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -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 diff --git a/app/models/bubble/commentable.rb b/app/models/bubble/commentable.rb index dce3f8602..adc9626b1 100644 --- a/app/models/bubble/commentable.rb +++ b/app/models/bubble/commentable.rb @@ -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