On Lunes, 22 de Junio de 2009 08:51:06 jalberto escribió:
> Hola,
>
> i will try to explain the situation:
>
> i have two scaffolds: "devices" and"interfaces" , "interfaces"
> belongs_to "devices" and "devices" has_many "interfaces". To this
> point all is correct. In /devices i can see all the devices and a
> nested table "interfaces" and i can do CRUD in both.
>
> The problem is i can access /interfaces/new,etc directly. How can i
> block that access without block access from nested table in /devices ?
>
> Maybe is a ActiveScaffold bug because CRUD links in nested tables use
> "/inrefaces/new" but it should use /devices/[id]/interfaces/new

The link should be something like 
/interfaces/new?parent_id=interface_id&parent_column=device&parent_model=Interface

In the form you shouldn't have fields for interface association.

I'm working in change nested scaffolds url to use nested routes in experimental 
branch.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 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