Never mind on the first part either, that was something of how I was
making the initial DB call.
On Dec 5, 10:15 pm, kevinpfromnm <[EMAIL PROTECTED]> wrote:
> I've got this show page that for the given section, it loads all
> issues in that section and stories in those issues and owner (user)
> for each story. However, when doing permissions checks it doesn't use
> the existing info but makes another call to the database. Like this:
>
> CACHE (0.000000) SELECT * FROM "users" WHERE ("users"."id" = 1)
> CACHE (0.000000) SELECT * FROM "users" WHERE ("users"."id" = 1)
> ...
>
> It's worse when I include the full permissions check which loads the
> issue for the story and then the section for the issue even though
> those should be in memory already. So 3 additional DB calls per
> story.
>
> Actually, this second part might be a rails failing. Yeah, it's rails
> on that. Why doesn't rails have the sense to recognize that in
> issue.stories[i].issue, issue is the same at both points? Or even
> that section is the same at both points in section.issues[i].stories
> [j].issue.section?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---