Stick with one term

This commit is contained in:
David Heinemeier Hansson
2025-04-11 16:57:03 +02:00
parent a8aa2c4f80
commit 5ecf0ce3f6
+2 -2
View File
@@ -2,7 +2,7 @@ class Cards::CommentsController < ApplicationController
include CardScoped
before_action :set_comment, only: %i[ show edit update destroy ]
before_action :ensure_authorship, only: %i[ edit update destroy ]
before_action :ensure_creatorship, only: %i[ edit update destroy ]
def create
@card.capture Comment.new(comment_params)
@@ -28,7 +28,7 @@ class Cards::CommentsController < ApplicationController
@comment = @card.comments.find(params[:id])
end
def ensure_authorship
def ensure_creatorship
head :forbidden if Current.user != @comment.creator
end