This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
### GIT | |
source ~/.bash/gitprompt.sh | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
alias gss="git status --short" | |
alias gl="git log --pretty=format:'%Cred%h%Creset - %C(green) %an %C(reset) - %C(yellow)%d%Creset %s %Cgreen(%cr) %Creset'" |
OlderNewer