Answer the question
In order to leave comments, you need to log in
How to send js variable to rails controller?
Hello, I need to send a JS variable to a rails controller.
ajax code
$.ajax({
url: "/film_sessions/:id",
type: "post",
data: { data_value: JSON.stringify($arr) }
});
@test_test = params[:data_value]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question