My active scaffold controller utilizes custom_finder_options and joins
to for the list action. It has an association for "user", which I have
set up for a show link when clicked on in the AS list.

My main list query already retrieves user_id, users.first_name,
users.last_name, so I have that data available. However, an extra
query gets executed for this association:
SELECT `users`.* FROM `users` WHERE SELECT `users`.* FROM `users`
WHERE (`users`.`id` IN (12,20,10))

I realize this is a query for eager loading, but it is unneeded. I
have tried disabling eager loading by setting "includes = nil", but it
still makes a query for each individual record. I want to completely
disable this extra query and have my users_column helper just display
the first_name + last_name.

What is the best way to approach this?
I have disabled eager loading and found out where to conditionally
omit this, but it is a mess. Is there a configuration option or a
cleaner/simpler way to override a method to disable any querying on an
associated model?

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.

Reply via email to