0

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 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Hmmm, in that case how would i call my partials within my js.erb files? is it possible to do that?
Yeah it is through <%= render 'partial' %>, you might want to wrap it with escape_javascript

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.