Pabi
Pabi

Reputation: 994

Update Embedded Ruby Values in Javascript

I am looking for a way to update ruby global variables in javascript.

Say I have two values defined: <%@value1=[]%> <%@value2=[]%>, both equal to blank arrays. How can I updates these array using javascript?

Thank you. Please let me know if I wasn't clear enough.

Upvotes: 0

Views: 51

Answers (1)

John Pollard
John Pollard

Reputation: 3899

I would use AJAX to hit the server with your new value and change the ruby (server) value there.

Upvotes: 1

Related Questions