has_many :commentshas_many :commentsbelongs_to :post
belongs_to :user@comment = @post.comments.create(comment_params)create создаёт обьект из переданных параметров и сразу сохраняет его, так что добавление потом @comment.user = current_usercreate используйте build и сохраняйте руками@comment.save@comment = @post.comments.build(comment_params)
@comment.user = current_user
@comment.save