On Mar 11, 3:31 pm, cdubd <[email protected]> wrote:
> > What's in the _comment partial ?
>
> get ready.... this is a pretty hairy partial... This was my first shot
> at coming up with a javascript driven comment system. Any tips on
> things to change would be appreciated.
>
> <%div_for(comment) do %>
> <div id="comment_user"><%= user_for(comment.user_id)%><div
I don't know that user_for does, but that obviously won't use the
comment.user object that has already been loaded.
> <div id="vote_score_<%=comment.id%>" class="cvote_score">
> <%= comment.reload.total_votes %>
Well this is why you get lots of queries loading the comment
Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---