Forum: Ruby on Rails Way to put javascript you want to appear in the head but dec

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Carl Y. (Guest)
on 2006-03-02 03:03
(Received via mailing list)
I have some javascript that is specific to an rhtml template but must
appear
in the <head></head> section.  I figured I could just put it in a
variable
at the top of my template and make my layout conditionally output that
variable if it existed.  But is there a better way to do this that has
already been standardized in rails?

Thanks,
Carl
This topic is locked and can not be replied to.