hi all,
I am new to ruby on rails and doing a small application as I am
learning ruby on rails…
Problem:
Basically I want to send an array @all_languages to a javascript method
… and be able to access the array in it…
Details:
I have an array of (language_name,language_id) pairs in variable
@all_languages
Eg: [ ( English, 1 ) , ( French, 2 ) , ( German, 3 ) ] …
I am displaying every language as a row in a table
I have a link called add_lang_row which calls a javascript code to
dynamically add a new row with language_name select box
the javascript code add_lang_row takes a parameter of array of
languages described above ie array of (lang_name, id ) pair which is
used to fill the select options…[ this is working fine given my
parameter is proper ]
But I cant call the script as
so i tried …
I am getting syntax error …
I am sure ruby will have some cool way of doing this … as with habtm
etc etc…
can anyone help me here…