Hello, my doubt is the following. The line of code below fetches all the comments made for an specific event: [code] @comments = @event.event_comments.paginate(:all, :include => [:comment_by], :order => "created_at DESC", :page => params[:page], :per_page => 10) [/code] As you can see it has a :include => [:comment_by] to include the name of the user who made the comment. event_comment model [code] belongs_to :comment_by, :select => "id, name, lastname", :foreign_key => :commentator_id, :class_name => "User" [/code] On my views I have a partial that loops the comments and contains code similar to this: [code] comment.comment_by.name [/code] So my question is: If I don''t put the include on the find method and let the views as they are, does rails make a new query when it sees something like comment.comment_by.name. And if that is the case, if I put the include on the find, am I saving those queries from happening for each comment later on? Thanks, Elioncho --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---