Hi guys!
In Rails, can you stick Rails code in a javascript function? An example,
this code from the Geokit plugin on a view page which doesnt work for
me:
Any help would be appreciated!
cheers!
Hi guys!
In Rails, can you stick Rails code in a javascript function? An example,
this code from the Geokit plugin on a view page which doesnt work for
me:
Any help would be appreciated!
cheers!
you can put everything in a textfile with erb
<% … %> will be executed
<%= … %> will be executed and the return value inserted in the file
so the above code looks fine and you should give us some details what
‘does not work’ for you. get an error message? nothing happens at all?
the erb tags are inserted ‘as is’ in the output (check source code in
browser)?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs