What is the best way to take a serialized list in JavaScript and save it to an instance variable array(or hash) in Rails?
Share
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.
Javascript code runs on the client, and your Rails code runs on the server, so there’s no way to directly pass your Javascript data to Rails. Instead you’d likely have to set up a controller to specifically handle an HTTP POST with your serialized data as the payload.