azback5 said over 3 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])

    def update
       redirect_back(fallback_location: root_url)
       render "edit"


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?