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
#in template | |
{{tb-select value=market_po options=controllers.menus.markets}} | |
#Work in progress | |
Ember.TEMPLATES['components/tb-select'] = Em.Handlebars.compile ' | |
{{view view.OptionsView}} | |
' | |
Binders.TbSelectComponent = Ember.Component.extend |
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
#In template | |
{{tb-select options=controllers.menus.pods value=pod}} | |
#Work in progress | |
Ember.TEMPLATES['components/tb-select'] = Em.Handlebars.compile ' | |
<div class="controls"> | |
{{view view.OptionsView}} | |
</div> | |
' |
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 must run before application.create. | |
DS.RESTAdapter.map 'App.ParentModel', | |
foos: { embedded: 'always' } #has many | |
bars: { embedded: 'always' } #has one aka belongsTo | |
App.ParentModel = DS.Model.extend | |
foos: DS.hasMany App.Foo | |
bars: DS.belongsTo App.Bar |
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.RESTAdapter = DS.RESTAdapter.extend({ | |
serializer: DS.RESTSerializer.extend({ | |
primaryKey: function(type) { | |
return '_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
dogarrhea: out of curiosity, why did ember marketing decide to attach the "MVC" label to ember.js when ember doesn't really have a data solution that's solid yet? | |
[12:32pm] mixonic joined the chat room. | |
[12:32pm] dogarrhea: it's pretty deceptive and leaves a bad taste in my mouth when I use it and find out. This is the opposite of what marketing wants right? | |
[12:32pm] alexd08 left the chat room. (Quit: This computer has gone to sleep) | |
[12:33pm] dogarrhea: i'll just stop until everything is ready. not provide free QA |
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
<ul> | |
{{#each song in songs}} | |
<li>{{song.title}}</li> | |
{{/each}} | |
</ul> | |
MyListView: Em.CollectionView.extend | |
tagName: 'ul' | |
itemViewClass: Em.View.extend | |
template: Em.Handlebars.compile ' |
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
Binders.SpotsNewRoute = Binders.ModalEditRoute.extend | |
model: (params) -> | |
m = Binders.Spot.createRecord() | |
m.setProperties | |
account_service: Binders.AccountService.createRecord() | |
agency_production: Binders.AgencyProduction.createRecord() | |
creative: Binders.Creative.createRecord() | |
digital: Binders.Digital.createRecord() | |
planner: Binders.Planner.createRecord() |
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
#The code before the update. Used to work, but now it breaks. | |
Binders.SpotsEditRoute = Em.Route.extend | |
model: () -> | |
Binders.Spot.find 1234 | |
Binders.Router.map -> | |
@resource 'spots', -> | |
@route 'new' | |
@route 'edit', { path: ':spot_id/edit' } |
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.RESTAdapter.map('App.Database', { | |
primaryKey: 'name' | |
collections: { embedded: 'load' } | |
}); | |
DS.RESTAdapter.map('App.Collection', { | |
primaryKey: 'name' | |
}); |
NewerOlder