Confusing rails div id naming
- by RailAddict
I have started using jQuery and rails. I have made a simple form that submits to the database and updates the page without reloading with ajax.
In my jQuery functions I used $"#new_comment" for the id name (in my application.js and create.js.erb files) but on my articles/show view file, I named the div "add_comment" and it works..
I renamed it new_comment and it breaks! Can someone explain it please? I get an error: "no action responded to 1"
My function in my controller is "create".