Permalink
Browse files

better 404

  • Loading branch information...
1 parent 74cbd8a commit 334874935ca99fdcca02b10cbe4422b5c7c4466a @benbalter committed Mar 1, 2013
Showing with 5 additions and 2 deletions.
  1. +4 −1 _cs/application.coffee
  2. +1 −1 _includes/js/application.js
@@ -318,11 +318,13 @@ class Router extends Backbone.Router
Application.tags = new Application.Collections.Tags
Application.tags.on "reset", ->
new Application.Views.Tag( model: Application.tags.get tag ).render()
+ @setNav ''
category: (category) ->
Application.categories = new Application.Collections.Categories
Application.categories.on "reset", ->
new Application.Views.Category( model: Application.categories.get category ).render()
+ @setNav ''
redirect: ->
document.location = Application.url + "/" + Backbone.history.fragment
@@ -340,7 +342,8 @@ Backbone.history.start pushState: true, silent: true
if window.is404? and window.is404
window.is404 = null
- Application.router.navigate document.location.pathname.replace("/",""), trigger: true
+ Application.router.navigate "", replace: true
+ Application.router.navigate document.location.pathname.replace("/",""), trigger: true, replace: true
jQuery(document).ready ->
Oops, something went wrong.

0 comments on commit 3348749

Please sign in to comment.