User app fixes for cors and data origin

This commit is contained in:
2014-08-25 20:38:07 +02:00
parent 4a1ba301f0
commit 8604636bc8
4 changed files with 10 additions and 2 deletions
@@ -49,7 +49,10 @@ App.ApplicationRoute = Ember.Route.extend
else
message = t('errors.404.general.message')
@transitionTo('index').then (route)->
route.get('controller.controllers.application').set 'notice', message
route.get('controller.controllers.application').set 'notice', message if route and route.get
$log
action: 'applicationerror'
error: error.message
scanQr: ->
<% if Rails.env.user_app? %>
@@ -24,8 +24,11 @@ App.ApplicationSerializer = DS.ActiveModelSerializer.extend
App.ApplicationStore = DS.Store.extend
adapter: DS.RESTAdapter.extend
host: $data_host
namespace: 'user'
# user underscored paths
pathForType: (type)->
decamelized = Ember.String.decamelize(type)
Ember.String.pluralize(decamelized)
headers:
Accept: 'application/json'