On Jueves, 16 de Septiembre de 2010 16:11:10 Iñaki Baz Castillo escribió: > Hi, model_1 has_one model_2. > > 1) In model_2 list view I don't want to allow creating a new entry. > This is, I want to hide the "Create" button. > > 2) In model_1 list view it's possible to create a model_1 instance for > each model_2 entry (or modity the existing one). > > > However I don't know how to achieve step 1. If I set model or > controller authorization rules for "create" action in model_1 then > step 2 fails. So, how could I just hide the "Create" button in model_1 > list view? (of course I don't want to use "always_show_create").
I'm not sure if I have understood you. You can try removing create action from model_2 controller if you create model_2 records as a subform inside a model_1 form. Or you can remove link with config.create.link = false, although typing the url you will get the model_2 create form. > > Thanks. > > -- > Iñaki Baz Castillo > <[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.
