Skip to content
Browse files

New Google Analytics, changed log level

  • Loading branch information...
1 parent 06a3bfe commit cdaa6edd395888bfa1481ad767c9f1af01acbff6 @kunaldi kunaldi committed Feb 15, 2012
View
2 app/controllers/sidewalks_controller.rb
@@ -17,7 +17,7 @@ def index
def find_closest
gc = Address.geocode("#{params[:address]}, #{params[:city_state]}")
- render :json => {:errors => {:address => [t("errors.not_found", :thing => t("defaults.thing"))]}}, :status => 404 unless gc && gc.success
+ render :json => {:errors => {:address => [t("errors.not_found", :thing => t("defaults.thing"))]}}, :status => 404 unless (gc && gc.success && gc.street_address)
unless (sidewalk = Sidewalk.find_by_address(gc.street_address.upcase))
sidewalk = Sidewalk.find_closest(gc.lat, gc.lng, 1, 0.02).first
View
11 app/views/layouts/application.html.haml
@@ -16,9 +16,14 @@
%meta{:content => "Adopt a sidewalk by claiming it on an interactive map", :itemprop => "description"}
%meta{:content => "http://www.cityofchicago.org/content/dam/city/depts/mayor/Chicago%20Shovels/FireHydrant.png", :itemprop => "image"}/
- %script{:type => "text/javascript"}
- -# FIXME: update the domain.
- var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-2412440-12"]),_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)}();
+ :javascript
+ var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-29218311-1']);_gaq.push(['_trackPageview']);
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery?
%body
View
2 config/environments/production.rb
@@ -31,7 +31,7 @@
# config.force_ssl = true
# See everything in the log (default is :info)
- config.log_level = :warn
+ #config.log_level = :warn
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new

0 comments on commit cdaa6ed

Please sign in to comment.
Something went wrong with that request. Please try again.