#rubyonrails - Sat 10 Mar 2007 between 00:00 and 00:15

NY Lost Funds



AnalogHoleif I perform some database updates in an after_create on other models, will those updates be rolled back if the after_create returns false?
technodoltnewcastle brown ale rules
:)
AnalogHoleNot sure if that is clear or not.
technodoltthe database updates will be rolled back if they would have been rolled back anyway
i mean... just returning false from after_create won't make them roll back
AnalogHoleAfter an object is created, I used the after_create call back to create some associated objects. But I want the whole thing to roll back if anything fails n the after_create
Oh, i thought after_create returning false would trigger a roll back.
technodoltafter_create isn't called until the initial transaction is completed
ie. your model has already been saved to the DB
the best you can do is try to create the associations, and if THOSE fail, then have the model destroy itself
carterparkstechnodolt: i second the newcastle comment
technodolti'm not 1000% positive about that
AnalogHoleHmm, that is no fun..
technodoltbut i'm 99%
hmm
funbagsAnyone here in the NY Area (NYC / Longisland) looking for some work? (ecommerce)
technodoltyou going to be around a little bit, analog?
i'll test it out for you?
AnalogHoleSure, I'll be here.
I know the create is wrapped in a transaction already...
technodoltmeh, don't have mysql installed... it'll take me about 5 minutes or so to get everything set up :)
i have _got_ to wipe this PC and start over soon... I think I might dual-boot windows and ubuntu, if i can find linux drivers for my pcmcia wireless
mrkrisNETSPLITTTTTttttt
technodoltwhat is a netsplit?
funbagsnetsplit = a server took a dump and took 1/2 the users with it
AnalogHoletechnodolt: it definitly rolls back if there is an exception. But I don't want to have to catch an exception. Let me see if adding to errors does it.
technodolthmm
oh, and btw analog
are you on edge or stable?
RadarListenertechnodolt, in more comprehensive terms, this irc "server" is actually a network of "servers" all linked together. Ocassionally one of them goes down, taking users connected to it with it.
technodoltahh
cool
mycpuisneuralnetcan someone explain why this migration is throwing an error saying 'mysql cannot rename'
im not even renaming anything -- http://pastie.caboo.se/45981
RadarListenertechnodolt, the command "/links" should give you a list of all the freenode servers.
AnalogHoletechnodolt; 1.2.2
RadarListenermycpuisneuralnet, it's the migration that's doing it, not your code.
it's trying to create another table, or at least rename the current one to something else, do you have permissions to do that?
AnalogHoletechnodolt: I guess I can throw an exception and add to errors

Page: 2 9 16 23 30 37 44 51 58 65 72 

IrcArchive

NY Lost Funds