Bug #753
Archives Sidebar Plugin broken
| Status : | Closed | Start : | ||
| Priority : | Normal | Due date : | ||
| Assigned to : | pdcawley - | % Done : | 0% |
|
| Category : | sidebars | |||
| Target version : | 4.0 | |||
| Resolution : | fixed |
Description
The Archives Sidebar Plugin seems to be broken.
The following line seems not working any more:
this_blog.published_articles.before(Time.now).inject([])
I'v got the notion that that the reference "this_blog" is nil in sidebar plugins?
Is this possible?
Associated revisions
Closes #753
History
06/02/2006 02:28 AM - trejkaz-trypticon-org -
I don't think this is related to this_blog because I changed my copy to use Article.find_published instead, and it still happens.
The error is probably inside the block, because this doesn't give the same error:
Article.find_published.inject([]) { |archives, a| archives << 1 }
07/06/2006 03:50 PM - scott -
Hmm. Seems broken for me too. Also, it's really slow--the archive SELECT statement takes ~6 seconds on my laptop.
I'll see what I can do with this one before 4.0.0
07/08/2006 05:36 PM - scott -
- Status changed from New to Closed
- Resolution set to fixed
(In r1086) A bunch of performance fixes (and also a couple created_at/published_at fixes).
This drops our render time on my big DB from ~12 seconds to ~1 second. That's still
way too slow, but we're moving in the right direction. We're down to ~40 queries
for a 15-entry index page now, down from 300. And, half of the remaining queries
are basically Blog.find(1). I'm not sure why the eager loading on Articles isn't
helping with this.
This also closes #851--the archive sidebar was one of the big contenders, eating
6 or 7 seconds per query. It's down to a few ms now.
