On Lunes, 22 de Noviembre de 2010 14:43:13 cschlaefcke escribió:
> Hi Folks,
>
> I am playing around with custom functions and rjs for nested scaffolds
> and have a problem of fitting the required data to the row that I want
> to replace with.
>
> I update the desired record within my custom action_links function
> and
> in my rjs template I do
>
> page.replace @record_row_id, :partial => 'list_record', :locals =>
> {:record => @record}
> page << "ActiveScaffold.stripe('#...@record_tbody_id}');"
>
> where I identify the record to replace by "@record_tbody_id"
>
> The general process is working so far and the old record in the list
> view gets replaced with the modified one. But the new record now shows
> an extra column showing the referenced parent record which should be
> hidden when displaying as nested scaffold.
Probably constraints aren't loaded. Is eid parameter sent in the request?
Also, there is a template named update_row.js.rjs which updates a row, so you
could use it instead of your view. You only have to set @record and call
render :action => 'update_row'
>
> I tried to figure out how AS itself is doing the job of hiding
> reference columns between parent/child records whithin nested
> scaffolds but could not figure out.
>
> Could someone point me to the right direction?
>
> Thanks & Regards,
>
> Christian
--
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.