I haven’t been able to find documentation that talk about how create.js.erb and destroy.js.erb fit in a Rails 3 app.
What is the logic behind these types of Javascript files in the app > controllers? How and when are they accessed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
File extensions are associated with Mime types. Check my answer here. It was written for Rails 2.2.2, but the same logic still holds. Note that the
respond_tosyntax has changed in Rails 3.Also, these files are not in
app/controllers, but inapp/views/<controller_name>/