This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Hongli Lai (Phusion (author)
Sun Sep 21 14:01:32 -0700 2008
commit 46939a9b5a0098fddeac99a8a4331f66bdd0710e
tree 8e233668c2bac790bd54b50d664f813903f199f6
parent 5f83e1844c83c19cf97c6415b943c6ec3cb4bb06
tree 8e233668c2bac790bd54b50d664f813903f199f6
parent 5f83e1844c83c19cf97c6415b943c6ec3cb4bb06
... |
... |
|
... |
... |
|
... |
... |
|
... |
... |
|












This seems like a significant de-optimization. The code does look a bit prettier, but is that worth the cost of loading the record’s fields and instantiating a model object just to do nothing with it?
Josh, I’m not sure there is a new record being loaded. If you notice before it was association.class.delete now it is association.delete. It appears to me that the class was already loaded.
There is a difference between loading a class and loading a record. But anyway, we talked this over in #rails-contrib. I was assuming AR was being smart and not loading the record to delete it via the association, but that’s not what’s going on. This patch actually makes it easier to add that optimization to AssociationProxy in the future, so it’s actually a win there too.
I meant ‘it appeared that the record was already loaded.’