Fork me on GitHub
#off-topic
<
2015-08-21
>
borkdude15:08:42

is there a Rails slack?

borkdude15:08:52

I have a Rails question, but nobody on IRC answers

scriptor15:08:16

could try the mailing list

pxlpnk16:08:03

borkdude: you should actually catch this in your controller

borkdude16:08:28

@pxlpnk: how can I tell in which of the associated cards the exception happened?

pxlpnk16:08:30

the carrierwave gem hooks into your AR models

pxlpnk16:08:13

in general you should get away from the callbacks model and explicitly upload the files in its own module/class implementation

pxlpnk16:08:33

then you can catch which one of the cards fail but still complete the others for example

pxlpnk16:08:43

handling the callback madness of rails is not so nice

pxlpnk16:08:23

what we did is we have an explicit uploader class that handles this kinds of things, and we call .store! on the individual files

borkdude16:08:40

that sounds good

pxlpnk16:08:58

there is probably some railsy way of doing this but that leads mostly to a massive headache.

pxlpnk16:08:10

I am also removing most of the callbacks in our apps as they just suck

borkdude16:08:31

I guess that is what I like about clojure: everything is mostly transparent and explicit

pxlpnk16:08:56

(we had ~1500 registered callbacks in our app)