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. Validation ran on all the objects.
3. The mass insertion method is ran against an array holding objects that pass validation. 4. The array of those that fail would be returned to provide feedback to the user on the offending entries.

I would think that this optimized method is trying to take advantage of mass INSERTS into a SQL database and not circumvent the ActiveRecord design completely.

Michael Koziarski wrote:
On 7/17/06, James Adam <[EMAIL PROTECTED]> wrote:
I'm still not convinced that a workaround like this is the right way
to solve these 'bulk load' / ETL scenarios.   Why not use your
database's import tools or some really lightweight SQL wrappers?

_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to