Hi,
in rails 3 you would do the following, if your conditions are not
about authorization:
conf.nested.add_link(:players, {:ignore_method
=> :nested_players_ignored?})
def nested_players_ignored?(record)
record.name == 'Werder Bremen' ? true : false
end
--
Volker
On Feb 10, 12:53 am, p k <[email protected]> wrote:
> I want to display the nested link for an associated model only for
> parent rows that met a certain condition.
>
> I defined a nested_authorized? method in my controller, which is hit
> for each row. However, it seems there is no context passed in which
> indicated which row the method was hit for.
>
> Is there another way hide the nested link based on a condition? Or is
> there a way to get the context in a nested_authorized? method?
>
> I saw a similar question
> here:http://groups.google.com/group/activescaffold/browse_thread/thread/fe...
--
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.