Pass JavaScript run through the application controller for localization

This commit is contained in:
Erik Michaels-Ober 2012-01-27 20:07:23 -08:00
parent 39733547fd
commit 68570f9603
4 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1,2 @@
class JavascriptsController < ApplicationController
end

View File

@ -14,7 +14,7 @@
= javascript_include_tag "http://twitter.github.com/bootstrap/1.4.0/bootstrap-twipsy.min.js"
= javascript_include_tag "http://twitter.github.com/bootstrap/1.4.0/bootstrap-alerts.min.js"
= javascript_include_tag "http://twitter.github.com/bootstrap/1.4.0/bootstrap-modal.min.js"
= javascript_include_tag "main"
= javascript_include_tag javascript_path
%script{:type => "text/javascript"}
var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-20825280-2"]),_gaq.push(["_setDomainName",".adoptahydrant.org"]),_gaq.push(["_trackPageview"]),function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}();
= stylesheet_link_tag "http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css"

View File

@ -8,6 +8,7 @@ AdoptAThing::Application.routes.draw do
get 'address' => 'addresses#show', :as => 'address'
get 'info_window' => 'info_window#index', :as => 'info_window'
get 'sitemap' => 'sitemaps#index', :as => 'sitemap'
get 'javascripts/main(.:format)' => 'javascripts#main', :as => 'javascript'
scope "sidebar", :controller => :sidebar do
get :search, :as => 'search'