On Jueves, 5 de Agosto de 2010 11:54:25 Benjamin Adler escribió:
> On 08/04/2010 02:44 PM, Sergio Cambra .:: entreCables S.L. ::. wrote:
> > I don't know how you overrided edit_associated view or action, but
> > edit_associated usually renders horizontal_subform (or what you set in
> > config.subform.layout), so overriding horizontal_subform partial you will
> > get the same html for initial edit-view and create another action.
>
> Batch has_many StorageAssignments.
>
> I undid my previous changes and created
> storage_assignments/_horizontal_subform[_header|_record].html.erb. But
> it seems that:
>
> The CreateAnother button uses the partial
> "storage_assignments/_horizontal_subform_record.html.erb"
>
> But using "render :partial => 'horizontal_subform_xxx'" in
> "storage_assignments/_horizontal_subform.html.erb" uses the partials in
> "frontends/default/views/". Why?

current controller is batches, so you have to add storage_assigments prefix, or 
rails only will search in app/views/batches y frontends/default/views:
render :partial => 'storage_assigments/horizontal_subform_record'

>
> http://wiki.github.com/activescaffold/active_scaffold/api-subform says
> that both controllers must have "config.actions << :subform". It does
> not seem to make a difference for me. I also tried using
> "config.subform.layout = :custom" in the storage_assignments-controller.
> The names change, but the problem remains the same.
>
> I know I could copy/link the files between the frontend-folder and the
> storage_assignment-folder, but that seems ugly. How can I talk AS into
> using the same record-partial for both?
>
> greetings,
> ben

-- 
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.

Reply via email to