macfanatic/active_admin — comment on commit 5c693a0c6895504fcbf8840b56141dc47db8b8a2
File:  line 0
By macfanatic:

For memory usage alone, I agree entirely - array of IDs is the way to go for performance reasons. This is a developer framework after all…. :)

On Dec 1, 2011, at 3:44 PM, Matt Vague wrote:

> Yeah.. in a lot of ways I agree it'd be nicer to pass in an array of AR models, but seems to me that the flexibility and simplicity of passing in a good ol' array of IDs outweighs.
>
> Part of the reasoning is that it's far easier to say ORM agnostic this way (otherwise you'd need to use an adapter layer for `find`). But the bigger reason is efficiency: instead of instantiating a bunch (could be hundreds) of AR models on each batch_action request you can now just execute SQL (or whatever) with an array of ids to delete/favourite/whatever them all. Pretty compelling reason IMO.
>
> Thoughts?
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/macfanatic/active_admin/commit/5c693a0c6895504fcbf8840b56141dc47db8b8a2#commitcomment-762196