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