I am using the paginate helper method to retrieve data from 2 tables.
Here is a sample of what the call looks like:
@paginator, @entries = paginate(:model_name, :include =>
''another_model_name'', :conditions => conditions, :per_page
=>
method_returns_number(), :order => @var_with_sort_params)
the problem I am having is there are extra SQL calls made after the
data is retrieved in the log... basically, paginate goes off and does
its thing running the queries required for the data, and then last but
not least, it makes a call like this for every record I have in my
page (so 10 records per page - 10 of these calls) to the
'':include''
table
2007-12-04 PST 14:59:48 DEBUG: [4;35;1mSQL (0.004367) [0m
[0mSELECT * FROM another_model_table WHERE (another_model_table.[id]
= 643) [0m
*Obviously I have changed the table names and sensitive information,
but in essence this is my issue...
Why am I getting all these extra calls per row in my page, I don''t see
this in similar use of the paginate helper in the application. Has
anyone else run into this?
I have tried several ways to debug, but I am open to suggestions there
too if you don''t have a solution.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---