ghost2061: i just got here.. but are you trying to do an array method, on an object containing an array by mistake?
ghost2061
keys: no, don't believe so.
esalinas has quit
Grapho: no, the value in the array is surprinsgly empty, so it can't find what it's expecting
wallerdev joined the channel
specifically: var helper = env.helpers[name];
esalinas joined the channel
name should be a partial that I have
mellatone
Do routes also have model hooks now?
Grapho
always
or at least for a long time mellatone
amk221 joined the channel
Weezey
I'm new to ember, minimal angular experience. Trying to get a feel for things, using latest ember-cli. If I want to bring in JSON data, should I be using ember data?
Grapho
ghost2061: what is suprising about the empty array value? what is it supposed to contain and how are you setting it? do you have a link fo code to share?
keys
Weezey: yes
vampolo joined the channel
Grapho
Weezey: with ember and ember-cli you have two options right out of the box: ember-data and ic-ajax
Weezey
any benefit to either? building the json with laravel.
Grapho
ember-data is the best because it handles caching the data, model dirty states, saving and deleting, with some simple methods to control
Weezey
okay, cool.
Grapho
ic-ajax is the simples to learn and will get you your json quick... but everything else is manual
kaspernissen has quit
juanpablo___ has quit
Linuus joined the channel
Weezey
One thing I haven't really grasped in my self-education here is the states. So like when the page loads, I want to load a list to populate some checkboxes, then the user submits a search with the data from those checkboxes and then it goes and does one json request per checkbox and populates a list below with the status of each.
kurko_ joined the channel
but, I'll dig more into ember-data to figure this out, that for pointing me in the right direction
dixon has quit
mellatone
Are there any idomatic patterns for route naming? I.e. nouns and adjectives exclusively
idiomatic*
Linuus has quit
mattwiebe has quit
thomasreggi joined the channel
vampolo has quit
ForSpareParts
mellatone: I’m not aware of any hard guidelines, but nouns and adjectives sounds like a good strategy to me.
Grapho
mellatone: that is mostly up to you and what makes the most sense... but nouns and adjectives is a good way to define things and the actions they can do
Markvw has quit
ForSpareParts
Weezey: What are you using on the backend? If there’s any kind of ORM in your stack, you’re probably going to like Ember Data.
Weezey
ForSpareParts: Laravel
So, Eloquent ORM
hjr3 joined the channel
a lot of the data's old though, doing a huge refactor, so I won't get the full benefit until I hit newer stuff
ForSpareParts
Weezey: I’ve never used Laravel, but ED basically gives you ORM functionality on the client side, with the caveat that you have to have a pretty robust API (almost certainly a REST API) to support it.
northm_ joined the channel
I think ic-ajax would be a decent fit if, say, you had two or three standalone API endpoints that didn’t correspond well to a specific model. But for getting your core data models into Ember (and back to the server), ED is probably what you want.
krampensolod has quit
ghost2061 has quit
so you might actually have reason to use both
samselikoff joined the channel
kaspernissen joined the channel
northm has quit
pixelhandler joined the channel
supernullset has quit
mellatone
Weezey: I’m familiar with Eloquent. You will have to use both.
Weezey
ok
timini has quit
aroberts
I’m in a component, and I want to create a computed property based on a promise that behaves like the CPs that are based on the model - how do I resolve the promise before returning the result?
mrbubbles joined the channel
Weezey
the one thing I don't really get with the ember documentation is everyone seems to just show code samples with very little direction of what file they should be in. Is that because they, for the most part, can be in any file?
ForSpareParts has quit
samselikoff has quit
vampolo joined the channel
juanpablo___ joined the channel
juanpablo___ has quit
juanpablo___ joined the channel
mrbubbles has quit
northm_ has quit
bengillies has quit
mellatone
Weezey: theoretically you can have the entire app in a single html file, with zero external resources.
bengillies joined the channel
ifeelectric joined the channel
dc__ has quit
there are build tools like ember-cli where you can separate routes, controllers, etc into individual files for maintainability, but on compilation, they’re just concatenated back together again
juanpablo___ has quit
vampolo has quit
juanpablo___ joined the channel
anix joined the channel
tyleri joined the channel
justin_hackin
Can someone pleeeeeease help me understand how model relationships get turned into api requests ? If I have a 'basket' and it hasMany items, if I modify one or more of the items and save the basket, will the post/put side-load the dirty relationships ? Or do I have to do that myself ? Assuming RESTAdapter
_1_mak25 joined the channel
amk_221 joined the channel
keys has quit
ifeelectric has quit
_1_mak25 has quit
lislis joined the channel
wldcordeiro joined the channel
madams__ has quit
wehlutyk joined the channel
amk_221 has quit
mrbubbles joined the channel
ifeelectric joined the channel
sandstrom has quit
vampolo joined the channel
TAsn joined the channel
samselikoff joined the channel
jpweeks has quit
jpweeks joined the channel
mupkoo joined the channel
docster has quit
docster joined the channel
ForSpareParts joined the channel
lislis has quit
jpweeks has quit
jpweeks joined the channel
tyleri joined the channel
vvs joined the channel
lislis joined the channel
lislis has quit
basz joined the channel
dadamssg joined the channel
codeurge has quit
edude03 joined the channel
fivetwentysix joined the channel
ecmacoder has quit
anix joined the channel
Linuus joined the channel
sandstrom joined the channel
H1D has quit
bogdanbalc joined the channel
Linuus has quit
hjr3 joined the channel
H1D joined the channel
imlinder has quit
aroberts has quit
ifeelect_ joined the channel
ifeelectric has quit
oblivionx
justin_hackin: look into embeddedrecordsmixin, and to your serializers, that's how you define how child records are pushed to your api
jpweeks has quit
in my case, my serializer specifies that I'm only pushing the ids, but you can set it up to push the entire record if you want to save parent + child in 1 request (in my use case, child records and parent records are updated independently)
vampolo has quit
jpweeks joined the channel
mrbubbles has quit
justin_hackin
so, suppose NOT using embedded, when I create a new record in a hasMany, I have to save the new record with a req then save the parent model, correct ?