Is there a way of telling appart dev from prod env in index.html generated by ember-cli? I am trying to switch a CSS link based on the env.
khoapham joined the channel
hectorh30 has quit
oblivionx-laptop
locks: got ESA working finally, about to attempt ember-data as per your recommendation, it does work with ember 1.12.1 right?
locks
afaik
coulix_tap: I think there's a way
coulix_tap
I am adding it to the initializer now so that my template can do a if Env.xxx
juanpablo__ joined the channel
Imaginativeone joined the channel
juanpablo__ has quit
KerrickLong joined the channel
l_tonz joined the channel
b1x1t0 has quit
gabriel_ has quit
khoapham has quit
gabriel_ joined the channel
khoapham joined the channel
bbankes joined the channel
oak has quit
rromanchuk has quit
alex88 has quit
annlewis joined the channel
superlou has quit
annlewis has quit
jonnn joined the channel
oak joined the channel
duggiefresh joined the channel
l_tonz has quit
duggiefresh has quit
dixon_ has quit
Imaginativeone has quit
l_tonz joined the channel
l_tonz has quit
l_tonz joined the channel
quaj has quit
rashkov joined the channel
juanpablo__ joined the channel
rashkov
let's say I have a comment-box component that contains a form. When the user submits the form, I don't have access to the store from within the component. How do I create a new comment model instance and save it? Bubble up the event to a controller?
locks
rashkov: confirm
rashkov
thanks
juanpablo__ has quit
l_tonz has quit
annlewis joined the channel
bbankes has quit
danielavila joined the channel
thock joined the channel
thock has quit
_michael joined the channel
_michael has left the channel
_daniel joined the channel
duggiefresh joined the channel
aum__ joined the channel
aum_ has quit
dc_ joined the channel
shinnya has quit
danielavila has quit
rashkov has quit
_daniel has quit
khoapham has quit
ryanRT joined the channel
ryanRT has quit
jrm2k6 joined the channel
krz joined the channel
l_tonz joined the channel
khoapham joined the channel
thejchap has quit
edude03 joined the channel
scottn_work has quit
coulix_tap
If I have a route Foo which has a model (collection of message) and the Foo template calls a component {{chat-messages}}. Do I need to pass the model to my component for it to access the collection? {{chat-messages model=model}}?
I tried App.ApplicationAdapter = DS.FixtureAdapter; as well.
jae joined the channel
jae has quit
jae joined the channel
l_tonz has quit
locks
you're not using ember-cli?
l_tonz joined the channel
coulix_tap
For fixtures? I did not know I could.
For the rest yes.
locks
`ember g adapter application` and then change it
p.s. you shouldn't be using FixtureAdapter, move to something like mirage when you can afford it
juanpablo__ has quit
l_tonz has quit
l_tonz joined the channel
jae has left the channel
l_tonz has quit
l_tonz joined the channel
coulix_tap
Mirage looks great, I will. For some reasons import DS from 'ember-data'; DS has no `FixtureAdapter` :/
locks
it was removed
I think it's in an addon now
it was removed because it's a bit :poop:y
💩 y
coulix_tap
Interesting. Ok I will really move to mirage next.
jonnn has quit
jonnn joined the channel
Should I report emberjs doc dead links somewhere?
locks
yes, make sure they're not fixed somewhere
by somewhere I mean in master
it's late
coulix_tap
Fixed in master, nice catch.
locks
👍
coulix_tap
Ok now I moved to mirage, I miss one last piece. My model is named `chat-message` and my future API will be /api/messages not /api/chat-messages/. I found the namespace option for my custom jsonAdapter but I wonder if there is a map function or something to translate `chat-message` into `messages`
It looks like pathForType and a custom adapter my model would do.
Testing.
annlewis joined the channel
rchavik joined the channel
It worked!
skoryky has quit
annlewis has quit
ivanskie has quit
duggiefresh joined the channel
duggiefresh has quit
l_tonz has quit
locks
nice :D
landongn joined the channel
jonnn has quit
geep has quit
pifantastic has quit
pifantastic joined the channel
coulix_tap
Ultimate question. If I have a mode file named `foo-bar.js` can I alias my model as `bar` everywhere else? For example the JSONApi except my objects type to be `foo-bar` but I want to use something else.
slash_nick joined the channel
It all the convention vs configuration balance. Coming from Django its not my favorite ;)