From 59477e5eac7f8326ce8232a2a78979815bca0d5d Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 5 Feb 2015 12:39:11 +0100 Subject: [PATCH] Configure location properly --- app/router.coffee | 3 ++- app/utils/location.coffee | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/router.coffee b/app/router.coffee index 56aa9275..b0f84bef 100644 --- a/app/router.coffee +++ b/app/router.coffee @@ -1,9 +1,10 @@ `import Ember from 'ember'` `import config from './config/environment'` +`import Location from 'travis/utils/location'` Router = Ember.Router.extend # TODO: we should use TravisLocation here - location: 'history' + location: if Ember.testing then 'none' else Location handleURL: (url) -> url = url.replace(/#.*?$/, '') diff --git a/app/utils/location.coffee b/app/utils/location.coffee index b48b12a3..822b34bd 100644 --- a/app/utils/location.coffee +++ b/app/utils/location.coffee @@ -1,4 +1,8 @@ +`import Ember from 'ember'` + Location = Ember.HistoryLocation.extend getURL: -> location = @get('location') location.pathname + location.hash + +`export default Location`