I’m using Rails 3.0. I want to add a Javascript file show_javascript.js that is in /public/javascripts/ to a view show.html.erb.
The show.html.erb file takes the <head>...</head> part from the template application.html.erb
I’m wondering how I should add it.
Assuming you have a generic stylesheet layout you could add the following to
application.html.erb:You could even use
content_forparams plusyieldin the<head>section like so: