def javascript_include_tag(string_or_array, *args)
      files = string_or_array.is_a?(Array) ? string_or_array : [string_or_array]
      options = {
        :charset => "utf-8",
        :type => "text/javascript",
      }.merge(args.extract_options!)

      files.map do |file|
        path = "#{ file.gsub(/\.js/i, "") }.js" # Append .js if needed
        path = "/javascripts/#{path}" unless path =~ %r((^/)|(://)) # Prepend javascripts directory to path if not a full URL or the root is specified
        options[:src] = url_for(path)
        content_tag(:script, "", options)
      end.join("\n")
    end
def javascript_include_tag(string_or_array, *args)
      files = string_or_array.is_a?(Array) ? string_or_array : [string_or_array]
      options = {
        :charset => "utf-8",
        :type => "text/javascript",
      }.merge(args.extract_options!)

      files.map do |file|
        path = "#{ file.gsub(/\.js/i, "") }.js" # Append .js if needed
        path = "/javascripts/#{path}" unless path =~ %r((^/)|(://)) # Prepend javascripts directory to path if not a full URL or the root is specified
        options[:src] = url_for(path)
        content_tag(:script, "", options)
      end.join("\n")
    end
Accepts a single filename or an array of filenames (with or without .js extension)
 Assumes javascripts are in public/javascripts

   javascript_include_tag "jquery.min"               # <script charset="utf-8" src="/javascripts/jquery.min.js" type="text/javascript"></script>
   javascript_include_tag "jquery.min.js"            # <script charset="utf-8" src="/javascripts/jquery.min.js" type="text/javascript"></script>
   javascript_include_tag %w(day night)              # <script charset="utf-8" src="/javascripts/day.js" type="text/javascript"></script>\n<script charset="utf-8" src="/javascripts/night.js" type="text/javascript"></script>