Might be obvious, but still I’m lacking here of the basic knowledge.
So inside controllers, can both be used, or is it always Javascript, so both are the same?
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.
In Rails 3.1 the only difference I can spot is that the if formatter is js, then the answer is sent as plain text. If it is json then it is encoded as json.
if format.json
server send:
if format.js
server send: