Worked for me but I had to pass parent_controller as a parameter in
the embedded list.

Thanks a lot.

On Sep 23, 7:25 pm, "Sergio Cambra .:: entreCables S.L. ::."
<[email protected]> wrote:
> On Miércoles, 23 de Septiembre de 2009 12:10:28 Gerald escribió:
>
> > Does this mean I have to pass parent_controller or parent_model to the
> > list action or will AS do that for me?
>
> > Thanks.
>
> ActiveScaffold pass parent_controller and parent_model when it's needed, IIRC
> parent_controller is sent in nested scaffolds and parent_model in nested 
> create
> forms. nested parameter is sent in some cases too, but it seems it doesn't
> work checking params[:nested].
>
>
>
>
>
> > On Sep 22, 10:17 pm, "Sergio Cambra .:: entreCables S.L. ::."
>
> > <[email protected]> wrote:
> > > 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]
>
> --
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to