so would the following be redundant then? <% content_for :javascript do %> <%= javascript_tag "new javascript function" %> <% end %>
assuming i have <%= yield :javascript %> in my main layout file. On Dec 11, 6:54 pm, "Conrad Taylor" <[email protected]> wrote: > On Thu, Dec 11, 2008 at 6:40 PM, David <[email protected]> wrote: > > > Are you allowed to use the javascript_include_tag to include > > javascript files for specific views? I have included the default > > javascript files in the <head> element of my site layout file, but > > when I try and include a javascript file for a specific view within a > > new <head> element in that view it does not work. I guess my question > > is: is it okay to create separate <head> elements for specific views? > > Will all the code get rendered that is within these new <head> > > elements and the <head> elements in my layout file? or will there be > > a conflict? > > Yes, you are allowed to use the javascript_include_tag to include javascript > files for specific view templates. Can you post your code so that people > can better assist you because I don't follow your question. > > -Conrad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

