On Viernes, 30 de Julio de 2010 12:18:13 Slapyvardis escribió:
> Hi,
>
> Problem:
> I have parent form "Invoice" and subform "Items". When I change select
> box "Pricing Template" which is inside "Invoice" form, I would like to
> update all existing "Price" fields inside "Items" subform.
>
> How to achieve that?
>
> Thank You, for your attention.

You have to write custom code. You can use render_field action and 
update_column and override render_field.js.rjs view:

# app/controllers/invoices_controller.rb
config.columns[:pricing_template].update_column = :items

# app/views/invoices/render_field.js.rjs
if params[:column] == 'pricing_template'
  page << 'custom js code'
else
  page << render(:super)
end

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