Javascript not being rendered at script but as html instead
This question is to piggy back off of a previous one I asked yesterday , which deals with moving the create/edit feature of a model onto its index page. One last issue I am having is that I when I go to delete a model, I have some javascript that is supposed to run that reloads the list of models to reflect the change in the database. This js is being rendered as html. Here is the code that I think is relevant: in my controller: def destroy @post = Post.find(params[:id]) @post.destroy flash[:notice] = "Successfully destroyed post." @posts = Post.all respond_to do |format| format.js {render