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
{ | |
"league": { | |
"id": 1, | |
"match_ids": [ | |
"129-140-league-1", | |
"130-139-league-1", | |
"131-138-league-1", | |
"132-137-league-1", | |
"133-136-league-1", | |
"134-135-league-1", |
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
"prizes": [ | |
{ | |
"id" : 1, | |
"competition_type" : "league", | |
"level": "gold", | |
"ingots" : 28.000.000, | |
"money" : 400, | |
"transfer" : "promotion" | |
}, | |
{ |
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
{ | |
"matches": [ | |
{ | |
"id": "133-149-league-2", | |
"configuration_id": "133-149-league-2", | |
"start_time": "2014-04-04T14:56:43+02:00", | |
"league_id": 2, | |
"local_cup_id": null, | |
"competition_type": "league", | |
"home_team_id": 133, |
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.Tournament = DS.Model; | |
App.LocalCup = App.Tournament.extend(); | |
App.Championship = DS.Model.extend({ | |
type: DS.attr('string'), //champions-cup, challengue-cup, kerad-cup | |
tournament: DS.belongsTo('tournament'), | |
leagues: DS.hasMany('league') | |
}); |
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.ApplicationSerializer = DS.ActiveModelSerializer.extend({ | |
serializeHasMany: function(record, json, relationship) { | |
var key = relationship.key; | |
var json_key = key.singularize().decamelize() + '_ids'; | |
var relationshipType = DS.RelationshipChange.determineRelationshipType( | |
record.constructor, relationship); | |
if (relationshipType === 'manyToNone' || relationshipType === 'manyToMany' || relationshipType === 'manyToOne') { |
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
DS.Model.reopen({ | |
canReload: function() { | |
return !this.get('isSaving') && !this.get('isReloading'); | |
}.property('isSaving', 'isReloading') | |
}); |
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.FooRoute = App.Route.extend({ | |
dependencies: ['session.team.championship', 'session.team.teamReport', 'customDependency','position', 'user:12345', 'lineup:cached'], | |
customDependency: function() { | |
return new Ember.RSVP.Promise(); | |
} | |
}); |
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 view; | |
module('Computed properties', { | |
setup: function() { | |
view = Ember.View.create({ | |
template: Ember.Handlebars.compile( | |
'{{my-component name="hector"}}' | |
) | |
}); | |
}, |
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 = Em.Route.extend({ | |
actions: { | |
showModal: function() { | |
//Quiero que entre aqui | |
} | |
} | |
}) | |
App.ParentComponent = Em.Component.extend({ | |
actions: { |
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
Resume: "Show view" took 16sec to load + initial fetching and app rendering | |
COMPONENT NAME | OCURRENCES | TOTAL TIME | AVERAGE | |
component:rt-icon 101 875 9 | |
component:rt-arrow 4 228 57 | |
component:rt-link-to 113 1785 16 | |
component:rt-offer-slidedown 1 202 202 | |
component:rt-user-avatar 19 1067 56 | |
component:rt-input 4 153 38 |
OlderNewer