Thanks. This explanation helps a lot. On Aug 23, 4:44 am, "Sergio Cambra .:: entreCables S.L. ::." <[email protected]> wrote: > On Miércoles, 11 de Agosto de 2010 16:44:23 Frederic escribió: > > > > > Hello everyone, > > I'm a little puzzled by the behavior of '.link' and '.link.label' > > inside or outside a block. > > > For example, if I do > > <code>active_scaffold:data do |config| > > config.search.link.label = "test" > > end > > active_scaffold_config.create.link.label = "test2" > > </code> > > both labels will change. > > > But if I do > > <code> > > active_scaffold:data do |config| > > config.search.link = false > > end > > active_scaffold_config.create.link = false > > </code> > > only the search link will disappear. > > > Can anyone explain why the difference in behavior? > > > Thanks a lot! > > Frederic > > After active_scaffold block is executed, links are added to > active_scaffold_config.action_links set, so setting > active_scaffold_config.create.link to false out of block won't work, because > create action link has been already added to action_links set. You have to > remove action link from action_links set, using the action name (:new in this > case): > active_scaffold_config.action_links.delete :new > > -- > 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.
