def edit
@comment = @commentable.comments.find(params[:id])
end
def update
@comment.update!(comment_params)
redirect_back(fallback_location: root_url)
render "edit"
end<%= link_to 'Edit', [:edit, comment.commentable, comment] %>