self[:owner_id] doesn't work either. I've tried self.owner_id as well and no luck. I don't really get any errors, but the column returns nil, which is impossible cause the values are there. Any other ideas ?
On Jan 11, 3:28 am, "Sergio Cambra .:: entreCables S.L. ::." <[email protected]> wrote: > On Viernes, 8 de Enero de 2010 20:27:37 GreatJohn escribió: > > > I got the act_as_authenticated plugin working on rails 2.3.5 and I'm > > noticing something weird. > > When declaring authorized_for..methods in models I can't access the > > column names from the particular model in the method. > > Say I have a model Garage and then > > def authorized_for_destroy? > > return true if (owner_id == current_user.id) > > end > > > owner_id is the column in garage table. Does anyone know why I can't > > access columns from Garage model in the authorized method? > > What error do you get? Have you overrided owner_id method? > > -- > 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.
