I am using rails 3.1. I send in my ajax request as json object but in my controller inside my respond_to function i would like to render a rjs file. How can I achieve this?
1 Answer
rjs files are no longer part of Rails 3. There are however .js.erb files. Not having developed in Rails 2 I'm not totally sure what .rjs files used to contain so that I cannot answer.
2 Comments
Rahul
Hmmm, in that case how would i call my partials within my js.erb files? is it possible to do that?
Emil Ahlbäck
Yeah it is through <%= render 'partial' %>, you might want to wrap it with escape_javascript