Topic: help for beginner

I need to insert a piece of Javascript into a Ruby on Rails website. I dont even know where to start, I have access to the whole server but I dont know where to put this code. It seems like it should be easier than it is.

I did find a cache folder and edited the root file and it worked for 30 seconds, but then it just gets overwritten with the new cache file and my edit is gone.

Can anyone help me or point me in the right direction? Where do you normally insert javascript? Or is it just too hard to tell without seeing the server files?

Re: help for beginner

For rails 3+Javascript files folder is: /app/assets/javascripts, so put your js file into this drectory, i.e. myscript.js Edit /app/view/layouts/application.html.erb, add to between <head> and </head> this one: <%= javascript_include_tag %>

Last edited by Ellzor (2012-03-16 14:40:40)