I've had issues with permissions myself but I managed to sort it out. If you could shed come more light on whats a child of what and when does the creation crap out?
On Sep 29, 11:46 pm, François Beausoleil <[email protected]> wrote: > I changed my #update_permitted? on the child to be: > > def update_permitted? > acting_user.signed_up? > end > > No change. I tried returning true from both #create_permitted? and > #update_permitted? on the parent and child: no change. > > Thanks for the tip. Any other ideas? > François > > On 29 sep, 14:31, kevinpfromnm <[email protected]> wrote: > > > would guess that your problem is in the update permission on the > > child. I would think it's choking on updating the existing belongs_to > > association and thus not rendering that part of the form. Hard to say > > for sure, but that'd be my take on it. > > > On Sep 29, 7:58 am, François Beausoleil > > > <[email protected]> wrote: > > > Hi all! > > > > I need help with the permission system. I can't make heads or tails of > > > it when using it in conjunction with child models. > > > > The short version: when logged in as an admin, creating a model with > > > children works just fine. When I login as a user with administrator => > > > false, I don't get the <input-many/>, even though I use #user_new and > > > create_permitted? returns true, always. > > > > The long version... Code athttp://gist.github.com/602767 > > > > In the pasted version, I have the code I really want to use, but if I > > > change the #create_permitted? methods to return true, the result is > > > the same. Removing the implementation of > > > KioskTransactionsController#new changes nothing - the lines aren't > > > displayed, and I can't use the +/- buttons. It's as if associations > > > weren't present when I'm not an admin. I also tried using #user_new > > > from KioskTransaction#initialize_with_no_consignment, to no avail. > > > > I read the "The Permission System - associations" section of the > > > manual very carefully. I searched this group. I asked the great Google > > > (which led me to the manual). Nothing in the agility tutorial stroke > > > me as the answer to my question. > > > > Again, I repeat: with no changes except logging in as an admin, > > > everything works. What am I missing? > > > > Thanks! > > > François -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
