azback5 said about 4 years ago on Nested Comments from Scratch :
I've been trying to add a feature here where we can also EDIT our comments. 

In comments controller I have added:

  def edit
      @comment = @commentable.comments.find(params[:id])
    end

    def update
       @comment.update!(comment_params)
       redirect_back(fallback_location: root_url)
       render "edit"
    end

__________________________________

And in our views _comment.html.erb partial i added in the div 'links'

<%= link_to 'Edit', [:edit, comment.commentable, comment] %>

__________________________________________________________

I am confused what to populate the edit.html.erb file with. Do you have any suggestions?

Thanks