cuz what I'm asking here goes against action bubbling :)
alexspeller
_lazarevsky_: it explains how action bubbling works in depth. Once you understand that, you'll see how you can send actions to routes through bubbling
Guest9000 joined the channel
renekooi joined the channel
yaymukund has quit
marinatedpork has quit
digitalpixelpro has quit
sandstrom joined the channel
_lazarevsky_
alexspeller: If neither the template's controller nor the currently active route implements a handler, the action will continue to bubble to any parent routes.
so my memory serves me well :)
now please bare with me
shwoodard
rwjblue: did you see my question above? if so, the error goes away with minification off
btw
:(
_lazarevsky_
im trying to call an action from the controller of the parent route in the subroute
shwoodard
it would seem it might be a bug with uglifyjs minification of jquery
_lazarevsky_
so projectsViewRoute's controller -> projectsView/projectRoute
alexspeller
_lazarevsky_: so send the action
_lazarevsky_: that's how action bubbling works
vampolo joined the channel
Osile joined the channel
Osile
Anybody else having issues connecting to github.com ?
_lazarevsky_
but if I send an action from the parent route it would bubble to its child route
it will be propagated to its parent
lbarratt joined the channel
it would not*
jonnn has quit
Eskimofo
why this is not working? "something" is true -> "yo" should be seen in the template
alexspeller
_lazarevsky_: you seem to be asking something different now
_lazarevsky_: that is not the same as "but if I send an action from the parent route it would bubble to its child route"
_lazarevsky_
my bad
Osile
jacksonmills: thanks
tr3online
alexspeller: thanks again, a few of these will suite my needs ;)
_lazarevsky_
alexspeller: basically what I wanna do goes against what Ember's all about
I must have structured that part of the app wrong
so projectsViewRoute is a list of projects on the left hand side of the screen, whereas projectsViewRoute/project is the panel on the right hand side of the screen which is populated from the clicked project
the model of projectsViewRoute is ProjectShells
a minified version of the project model
which only returns the id, name and priority
hpoydar joined the channel
next to each projectShell in the list there are two buttons.. involve or involve. Whenever each of those is clicked, I'd like to refresh the currently selected project
that's the spiel
alexspeller
_lazarevsky_: so just have an action
_lazarevsky_: in the project route
motto has quit
_lazarevsky_
ok
hyderali has quit
plumbacon joined the channel
how would I call an action of the projectsView/project subroute from the projectsViewController ?
that's what I'm stuck on :)
alexspeller
_lazarevsky_: I literally just gave you the code
_lazarevsky_
um... the msg didn't get delivered im afraid
alexspeller
_lazarevsky_: you need {{action 'whatever'}} in the template and actions: { whatever: function() {} } in the project route
_lazarevsky_
k cool.. this last msg I'm seeing for the first time.
now why this won't work is because of the following
alexspeller
_lazarevsky_: have you actually tried it
_lazarevsky_: because I'm pretty sure that it will work
_lazarevsky_
the buttons involve/uninvolve stay in a template for which the context is projectsShellController and the route is projectsViewRoute
alexspeller
_lazarevsky_: that's irrelevant
_lazarevsky_
im already doing this
the action does hit the said method
so the action gets to the projectShellsController
that's what i'm saying... now from there I need to call an action on the subroute
alexspeller
_lazarevsky_: why are you handling it on the controller?
Akii has quit
_lazarevsky_
that's what the Ember tutorials said when I first started out..
I need to move all my actions into the route as you once told me
but that would not make any difference
IMO
so now the question because, how do I call an action on a subroute from its parent route
alexspeller
_lazarevsky_: *sigh*
_lazarevsky_
question becomes*
alexspeller
_lazarevsky_: literally what you need is the code I pasted
_lazarevsky_: you need {{action 'whatever'}} in the template and actions: { whatever: function() {} } in the project route
darpa11 joined the channel
_lazarevsky_
ok
let me try that
alexspeller
_lazarevsky_: that is *all* you need.
darpa11 has left the channel
_lazarevsky_
if what you're saying turns out to be true then actions can BUBBLE DOWN
which is very unintuitive
brb
rickjames joined the channel
rickjames
hey guys I have a question about rendering a template from a hbs
ever since updating ember its not rendering anything
{{render "sometemplate" model }} doesnt actually render the template
chrishough joined the channel
alexspeller
_lazarevsky_: no, actions cannot bubble down
rickjames
and now on ember dev tool its showing the view as (inline template)
alexspeller
_lazarevsky_: but what I am saying is true
esopian joined the channel
_lazarevsky_: I suspect you are misunderstanding how action bubbling works
alexspeller: I doubt it. I think I'm not explaining myself correctly. What you've just told me to do is to send an action from a template for which the context is ParentRoute and define that action in the ParentRoute/ChildSubRoute
alexspeller: I will get back to you shortly
alexspeller: thanks for your time and patience
alexspeller
_lazarevsky_: templates do not have a context that is a route
ok the context is the underlying controller of ParentRoute
alexspeller
_lazarevsky_: yes. bubbling goes from the controller that is the context to whatever route is active. It's not releavnt that the route is named the same as the controller or not
zcourts joined the channel
rickjames
let me try renaming it alex and see if that works
alexspeller
Eskimofo: it should be App.SpComponentComponent
plumbacon has quit
rickjames
Thats what it was alex
whenever I renamed the view it appeared but when the view is named back to its original than it messes up
lolmaus joined the channel
Ran__ joined the channel
_lazarevsky_ has quit
Eskimofo
alexspeller ty
Ran__
I can't get JSONSerializer to work. When I set the primaryKey to "recno" I don't get any results
jonnn joined the channel
I tried my json as a fixture and changed 'recno' to id and removed the serializer and it work. But when I changed back to 'recno' and added the JSONSerializer primaryKey to 'recno' no success
the API that I am using uses 'recno' not id
Grapho
try RESTSerializer
Ran__
ok I will.
Grapho: you ROCK!
mikl joined the channel
esopian has quit
amk_221 joined the channel
Grapho
RESTAdapter => RESTSerializer
Ran__
<Grapho> That did the trick
Grapho
noice
Ran__
: )
kanja joined the channel
Ok now I can get some work done
Grapho: thanks again!
Ran__ has left the channel
Grapho
his boss will recieve an invoice
esopian joined the channel
plumbacon joined the channel
wadeo
Today I decided to upgrade my ember-cli to 0.2.2
Helvig joined the channel
and now im receiving a weird error
amk_221 has quit
events.js:85
throw er; // Unhandled 'error' event
^
Error: watch EMFILE
anyone else have this error recently, looked around on the web but could not find the exact issue pertaining to ember