I cannot install my bower dependencies because of the ddos attack against github.. it fails on arbitrary packages and it seems that the problem is that it always queries all repositories from the beginning even if they are installed already.. can I somehow make bower to "continue" or even "retry" if a request timed out?
andrew1
ohcibi: same. I have all but one failing. so close :)
ohcibi
its always another one
zPlus joined the channel
kroofy_ joined the channel
_lazarevsky joined the channel
_lazarevsky
howdy all
a quick question
can the default value for the query params be a computed property?
wehlutyk joined the channel
wehlutyk has quit
VasilVanchuk has quit
VasilVanchuk joined the channel
kroofy has quit
zPlus has left the channel
krz has quit
_lazarevsky has quit
ohcibi
andrew1: I just copied my bower.json to another server of mine and I can install all deps without a problem there.. I have some minor networking issues with my connection in my office as well... any chance you are also in a problematic network?
mszrnyi joined the channel
andrew1
ohcibi: ty will try
solirvine has quit
ohcibi
andrew1: I now tried to use wifi-tethering from my phone and it also works.. so its definitely my network here...
andrew2 joined the channel
hpoydar joined the channel
andrew1 has quit
xerox joined the channel
zinyando has quit
vmx joined the channel
hpoydar has quit
kezkankrayon has quit
phidah joined the channel
kezkankrayon joined the channel
AmilKey_ joined the channel
zinyando joined the channel
patie has quit
givanse has quit
consideRatio joined the channel
pvoborni_ joined the channel
pvoborni has quit
krz joined the channel
consideRatio has quit
consideRatio joined the channel
alnewkirk joined the channel
zinyando has quit
kezkankrayon has quit
kezkankrayon joined the channel
zinyando joined the channel
AmilKey_ has quit
dgaus
Hi, I'm trying to put some models I need from several controllers in a reasonable place. I first tried in the applicationcontroller, which works, but it's causing me a lot of troble when handling logins/logouts, since that controller needs to be loaded always. I tried putting each resource in a separate controller, but it seems the model is not loaded unless I visit that route. Any recommendations on this?
consideR_ joined the channel
engwan
dgaus: If it's application wide data, maybe a Service will do the job
phidah has quit
ambushsabre joined the channel
consideRatio joined the channel
dgaus
engwan: have you got any resources on that? I can't seem to find much in the ember guides
also `ember generate service <name>` if you're using cli
engwan
Basically it's just a singleton object
that you inject into your controllers / routes using the syntax provided in that doc above
VasilVanchuk has quit
dgaus
not using CLI atm
really I wouldn't mind using controllers, I just need a singleton to hold, say, all my user objects
can I use this.store inside a Service?
VasilVanchuk joined the channel
jkarsrud
dgaus: You can inject the store into your service in an initializer, yes
pvoborni_ has quit
dgaus
to be fair my problem is that this.store.find('model') calls the server each time, I know I can do .all(), but I do need to call find at least one time at app startup, but after login
jkarsrud
maybe you can do it in your application route's beforeModel hook? That's where you could 'inject' the store into your service too, if you don't want to use an initializer
munumnu
I don't know if I understood you correctly, but you could store the model inside an injected service (i.e. session) in the application route setupController
VasilVanchuk has quit
dgaus
jkarsrud: I was doing that, problem is, if the user is not logged in I need to redirect to a login page, and then I couldn't find a clean way to trigger a reload in that controller
well, I just storing it in the applicationcontroller
I am unsure how a service can be better in this case
juanpablo__ joined the channel
I thought the advantage would be being able to inject it in all controllers automatically
jkarsrud
That is one advantage, ye
yes*
dgaus
docs are a little lacking on this point, it seems =/
well it's a really new feature
jkarsrud
yep, it is
But in general, services are just singleton objects
juanpablo__ has quit
That can injected using the new Ember.inject.service() method
ambushsabre has quit
solirvine joined the channel
Duckily has quit
pvoborni joined the channel
jrhe
What do people do for general server error handling in their apps? Stuff like 400 errors, 500 errors, anything which can’t really be recovered from
gunn has quit
dgaus
jrhe: I'm catching those in the restadapter ajaxError method and displaying a message. Also have raven.js running for reporting those automatically
munumnu
jrhe, in addition to what dgaus said, we're also retrying the request n times
VasilVanchuk joined the channel
jrhe
dgaus: Do you catch and then rethrow a specific error? Do you set the error on a controller and then display in a flash message? As much interested in the UX as the technicalities. Currently either my app crashes or it gets swallowed up by errbit.
VasilVanchuk has quit
dgaus
jrhe: I pass the error to my application controller, which displays a message according to the error code. if it's 403 the user gets redirected to the login page, if it's 400 I prompt the user to correct any errors (shown below), if it's 500 just apologize and ask the user to reload the page
renekooi joined the channel
I'm using autosave a lot, so it's the same info-popup, onsuccess it fades after a few seconds, onerror it stays red