On Viernes, 11 de Febrero de 2011 16:04:55 p k escribió:
> Volker - I'm using rails 2.3. any idea how to do it in this version?
>
> Sergio - I'm not sure I follow. Could you elaborate a bit further?
class Model < ActiveRecord::Base
....
def nested_authorized?
here you can access to model instance
end
end
>
> Thanks!
>
>
> On Feb 10, 4:25 am, "Sergio Cambra .:: entreCables S.L. ::."
>
> <[email protected]> wrote:
> > On Jueves, 10 de Febrero de 2011 00:53:21 p k escribió:
> > > I want to display the nested link for an associated model only for
> > > parent rows that met a certain condition.
> > >
> > > I defined a nested_authorized? method in my controller, which is hit
> > > for each row. However, it seems there is no context passed in which
> > > indicated which row the method was hit for.
> > >
> > > Is there another way hide the nested link based on a condition? Or is
> > > there a way to get the context in a nested_authorized? method?
> >
> > Setting the authorization method in the model, try adding
> > nested_authorized?
> >
> > > I saw a similar question here:
> > >http://groups.google.com/group/activescaffold/browse_thread/thread/fe...
> > >
> > > 299565c4/b129373ab011b550?lnk=gst&q=nested_authorized#b129373ab011b550
> >
> > --
> > 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.