Altering vhochstein's config.list.columns select query

113 Aufrufe
Direkt zur ersten ungelesenen Nachricht

duker_48

ungelesen,
16.06.2011, 15:33:2716.06.11
an ActiveScaffold : Ruby on Rails plugin
On my list page, I am only displaying a few fields, and the table has
30+. How can I change the query from

select table.*
to
select table.[fields I am displaying]?

It seems to be pretty inefficient to return the entire table, when I
am only displaying a few fields.

Thanks!

vhochstein

ungelesen,
17.06.2011, 06:23:1417.06.11
an ActiveScaffold : Ruby on Rails plugin
Hi,

I would suggest to override:
# Override this method on your controller to provide custom finder
options to the find() call. The return of this method should be a
hash.
def custom_finder_options
{:select => ....}
end

--
Volker
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten