mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Fix a bug in comments controller
This commit is contained in:
@@ -34,7 +34,8 @@ class CommentsController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
comment = Comment.find_by(post_id: params[:post_id])
|
||||
comment = Comment.find(params[:id])
|
||||
|
||||
comment.assign_attributes(comment_params)
|
||||
|
||||
if !current_user.power_user? && current_user.id != post.user_id
|
||||
|
||||
Reference in New Issue
Block a user