On Domingo, 16 de Mayo de 2010 13:50:15 Pedro G. escribió: > Hi, > > I am dealing with a model implementing a tree by acts_as_tree. There > is a nested link (defined by config.nested.add_link(...) ) in the > model that I want to display for the root of the tree but not for the > rest of the nodes. > > I've set up a per request configuration that catches whether the node > is a root or not by checking params.has_key?(:nested). This way I've > been able to disable action_links using action_links.delete, but I > haven't figured out the way to disable a nested link > (columns[].clear_link doesn't seem to work)
clear_link remove a link in a column, but you added the nested link as an action link (config.nested.add_link is a shortcut for config.action_links.add which add an action link for nested action with some options). You have to use config.action_links.remove :nested and after add other nested links > > I would appreciate some help on this > Best Regards > Pedro. -- 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.
