El Thursday 08 January 2009 00:13:13 Wes Gamble escribió: > All, > > I have a module that is included into 3 of my controllers, each of which > is Active Scaffolded. > > However, not all three controllers have the same actions enabled, but my > common code needs to handle all three cases. > > How can I reliably inspect a given active_scaffold_config to see which > actions are actually enabled on it? > > For example, I want to know if the "show" action is enabled on a given > scaffold. > > active_scaffold_config.actions.include?(:show) doesn't work because the > action objects are not symbols.
It should work, that check is used in active_scaffold, look at actions/nested.rb -- Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::. Nicolás Guillén 6, locales 2 y 3. 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 -~----------~----~----~----~------~----~------~--~---
