On Martes, 22 de Septiembre de 2009 16:06:44 Gerald escribió: > Hi. > > I tried it but it did not work but when I hardcoded it to return false > it did work. I guess params[:nested] is not the correct param to check > for. Anybody with any ideas?
maybe, params[:parent_controller] || params[:parent_model] > > Thanks a lot guys. > > On Sep 21, 3:18 pm, "Sergio Cambra .:: entreCables S.L. ::." > > <[email protected]> wrote: > > On Viernes, 18 de Septiembre de 2009 16:57:19 Gerald escribió: > > > Hi guys. > > > > > > Is there a way to disable the create link only for embedded scaffolds? > > > > Try overriding create_authorized? in the controller. > > def create_authorized? > > super unless params[:nested] > > end > > > > -- > > Sergio Cambra .:: entreCables S.L. ::. > > Mariana Pineda 23, 50.018 Zaragoza > > T) 902 021 404 F) 976 52 98 07 E) [email protected] > > -- 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 -~----------~----~----~----~------~----~------~--~---
