On Martes, 4 de Mayo de 2010 19:05:45 Iñaki Baz Castillo escribió:
> Hi, I use associated_limit = 0 in my ClientsController so I see a
> clickable number in the list view:
>
>   config.columns[:cli_outs].label = "CLI's de salida"
>   config.columns[:cli_outs].associated_limit = 0
>
> But I want it to be displayed as the list of values (cli_outs) in the
> show view. Is it possible? I expected something like this would work:
>
>   config.show.columns[:cli_outs].associated_limit = 0
>
> but it gives an error. Is there any way to get it?
>
> Thanks a lot.

You can use a before_filter:

before_filter :set_associated_limit
protected
def set_associated_limit
        active_scaffold_config.columns[:cli_outs].associated_limit = 
action_name == 
'show' ? nil : 0
end


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