This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Router extends Backbone.Router | |
routes: | |
'listings/:id': 'listing' | |
listing: (id) -> | |
# update content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initialize: -> | |
@bind 'all', @_trackPageview | |
_trackPageview: -> | |
url = Backbone.history.getFragment() | |
_gaq.push(['_trackPageview', "/#{url}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check the jammit asset manifest for files that have not been tracked | |
# Only javascripts for now since we gitignore sass generated .css files | |
# TODO check for .css and .scss files | |
require 'rubygems' | |
require 'jammit' | |
j = Jammit.load_configuration(Jammit::DEFAULT_CONFIG_PATH) | |
files = j.configuration[:javascripts].values.flatten.uniq | |
errors = [] | |
files.each do |f| |