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.PostsController = Em.ArrayController.extend({ | |
actions: { | |
create: function () { | |
// some validation logic here | |
return this.send('createPost'); | |
}, | |
save: function (model) { | |
// some validation logic here |
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
{ | |
"record": [ | |
{ | |
"id": 2, | |
"name": "3M Aerospace", | |
"website": "http://solutions.3m.com/wps/portal/3M/en_US/Aerospace/Aircraft/", | |
"isActive": true, | |
"isQAActive": true, | |
"createdBy": "32", | |
"createdDate": "2014-10-01T15:19:35", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; } | |
.string { color: green; } | |
.number { color: darkorange; } |
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
var string = DS.attr('string'), | |
bool = DS.attr('boolean'), | |
number = DS.attr('number'), | |
date = DS.attr('date'), | |
isoDate = DS.attr('isodate'); | |
App.Location = DS.Model.extend({ | |
name: string, | |
iata: string, | |
icao: string, |
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.ApplicationRoute = Ember.Route.extend({ | |
actions: { | |
back: function (path, model) { | |
console.log('APPLICATION.BACK'); | |
var transitionObject = App.Transition.create({ 'path': path, 'objectId': model.get('id') }); | |
this.transitionTo('transition', transitionObject); | |
} | |
} | |
}); |
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
// This schema throws the 102 error with related=* | |
{ | |
"name": "Currencies", | |
"label": "Currencies", | |
"plural": "Currency", | |
"primary_key": "id", | |
"name_field": null, | |
"field": [ | |
{ | |
"name": "id", |
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
Error Message: | |
Index out of range | |
Stack Trace: | |
Error: Index out of range | |
at new Error (native) | |
at Error.EmberError (http://localhost:1337/js/libs.js:14284:23) | |
at Array.__exports__.default.Mixin.create.removeAt (http://localhost:1337/js/libs.js:32218:19) | |
at arrayComputed.removedItem (http://localhost:1337/js/libs.js:28713:17) | |
at Object.DependentArraysObserver.flushChanges (http://localhost:1337/js/libs.js:27386:40) |
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.AppSession = SimpleAuth.Session.extend({ | |
currentUser: Ember.computed('userId', function () { | |
var userId = this.get('userId'); | |
if (!Ember.isEmpty(userId)) { | |
return this.container.lookup('store:main').find('user', userId); | |
} | |
}) | |
}); |
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.SimpleAuthCredentialsAuthenticator = SimpleAuth.Authenticators.Base.extend({ | |
setup: function () { | |
console.log(this.get('config')); // undefined | |
this.set('serverTokenEndpoint', this.get('config.api_servertokenendpoint')) // throws EX and poops out | |
}.on('init') | |
}); |
OlderNewer