Given an application layout like

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-type" content="text/html;
charset=utf-8">
    <title>Test</title>
    <%= stylesheet_link_tag 'test.css' %>

    <%= javascript_include_tag 'some_js', :cache => true, :charset =>
'utf8' %>
  </head>
  <body>
    <%= yield %>
  </body>
</html>

and a controller, say

app/controllers/root_controller.rb:
class RootController < ApplicationController
  def index

  end
end

and a view file
app/views/root/index.html.erb

is it then possible to include a javascript file in the head section
of the resulting html, which is exclusive to the RootController's
index view?

Forgive me if you find this question trivial. I'm learning.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to