On Martes, 4 de Mayo de 2010 16:18:50 Iñaki Baz Castillo escribió:
> 2010/5/4 Sergio Cambra .:: entreCables S.L. ::. <[email protected]>:
> > Are you sure? When app is started, class is loaded, while class is being
> > loaded Client.array is called and saved in ActiveScaffold config, which
> > is stored in a class variable. In each request, column is rendered using
> > options saved in a class variable, and new clients are not in that
> > variable. It works in development mode because classes are reloaded for
> > each request.
>
> Yes, but Client.array is not an array but a class method which does
> "Client.find.all..." stuff and returns an array.

Yes, I know it, but that method was called only once, on application startup, 
and you needed to call that method for each request. You have to be careful 
about what you put in active_scaffold configuration, because it's a static 
configuration in production mode, although in development it seems dynamic 
because is reloaded for each request. Dynamic configuration must be done with a 
before_filter.

-- 
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.

Reply via email to