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
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
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
CoachApp.IndexRoute = Ember.Route.extend | |
model: (params) -> | |
client_id = localStorage.getItem 'clientId' | |
localStorage.removeItem('clientId') | |
if CoachApp.get('token')? and client_id? and !isNaN(client_id, 10) | |
CoachApp.Client.findById client_id | |
afterModel: (client) -> | |
if client |
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
App.Route.map () -> | |
@resource "clients", -> | |
@resource "client" | |
@resource 'coaches', -> | |
@resource 'coach', path: ':coach_id', -> | |
@resource 'coachedclients', path: '/clients' | |
App.Coachedclients = Ember.Route.extend | |
model: (params) -> |