On Sábado, 26 de Septiembre de 2009 19:58:31 alexp escribió:
> Serge thanks, its faster a lot better on all page loads, speeds things
> up massively now it loads in a matter of 3-5 seconds on a large data
> set for a list view instead of 30 secs - muliple minutes (depending on
> the machine I use!)
>
> I'm trying to grab the counter_cache for only plural associations, but
> this isnt working - in the last mod you made I've changed it a little
> but not got the ability to grab the column's equivalent
> counter_counter cache
>
> value = record.send(column.name)
> if value && column.association && column.plural_association?
> associated_size = record.value.length || value.size if
> column.plural_association? and column.associated_number?
>
> record.value.length - how do I substitute "value" for what would be
> "players_count"!?
>
> Any one?!
Use record.send("#{column.name}_count"), but it should be already used, at
least I get it used when I add that column.
>
>
>
--
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---