Re: [Rails-core] ActiveRecord, create Optimization Patch

2006-07-17 Thread zdennis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James Adam wrote: > On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote: > >> > That said, I think providing an 'import' method as a plugin would >> > certainly be useful to some people (especially those too lazy to >> > connect to a database by hand). >> >

Re: [Rails-core] ActiveRecord, create Optimization Patch

2006-07-17 Thread James Adam
On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote: > That said, I think providing an 'import' method as a plugin would > certainly be useful to some people (especially those too lazy to > connect to a database by hand). I like to automate tasks, if that makes me lazy, then I am lazy. Me too - I mu

Re: [Rails-core] ActiveRecord, create Optimization Patch

2006-07-17 Thread zdennis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James Adam wrote: > On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote: > >> AR is so well thought out and designed, this seems >> like a core feature that is just simply missing. > > > Since you are looking for speed to the point where you are sacrifici

Re: [Rails-core] ActiveRecord, create Optimization Patch

2006-07-17 Thread James Adam
On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote: AR is so well thought out and designed, this seems like a core feature that is just simply missing. Since you are looking for speed to the point where you are sacrificing validations, and pretty much anything else vaguely active-record-ish, beyond

Re: [Rails-core] ActiveRecord, create Optimization Patch

2006-07-17 Thread zdennis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Koziarski wrote: > On 7/17/06, James Adam <[EMAIL PROTECTED]> wrote: > >> Since the behaviour is different from that of create (i.e. no object >> instances are returned), why not just define a new method which >> clearly indicates it's aptitud

Re: [Rails-core] #3527, flash and halted filter chains

2006-07-17 Thread Caio Chassot
Here's a quick diff that should fix the flash issue. It fails one test in verification_test, but seeing how verifications rely on before_filters, it's something to look into patching, probably. Also, maybe someone could transform my test controller into a real test for the issue being fixed

Re: [Rails-core] #3527, flash and halted filter chains

2006-07-17 Thread Daniel N
On 7/15/06, Rick Olson <[EMAIL PROTECTED]> wrote: On 7/14/06, Zack Chandler <[EMAIL PROTECTED]> wrote:> If you comment out the reset_session line the code works fine.> Looks like a bug to me.  I always like to reset the session upon login > to protect against hijacked sessions.>> Should I submit a

Re: [Rails-core] ActiveRecord, create Optimization Patch

2006-07-17 Thread Joshua Sierles
I'm still not convinced that a workaround like this is the right wayto solve these 'bulk load' / ETL scenarios.   Why not use your database's import tools or some really lightweight SQL wrappers?While the  'insert' method is more universal, I agree that it's often smarter to use the vendor tools. F

Re: [Rails-core] ActiveRecord, create Optimization Patch

2006-07-17 Thread Michael Genereux
I agree import is appropriate. However, the reason someone would want this in Rails is to integrate a CSV import through the web interface for an end user. Why would it skip validation though? I would expect: 1. A creation of ActiveRecord objects for all the elements in the hash. 2. Validatio

Re: [Rails-core] ActiveRecord, create Optimization Patch

2006-07-17 Thread Michael Koziarski
On 7/17/06, James Adam <[EMAIL PROTECTED]> wrote: Since the behaviour is different from that of create (i.e. no object instances are returned), why not just define a new method which clearly indicates it's aptitude for inserting large amounts of data? Model.import(hashes) or something... The be

Re: [Rails-core] ActiveRecord, create Optimization Patch

2006-07-17 Thread James Adam
Since the behaviour is different from that of create (i.e. no object instances are returned), why not just define a new method which clearly indicates it's aptitude for inserting large amounts of data? Model.import(hashes) or something... - james On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote: -