I have this in place for now.

<%= observe_field 'cart_record_attributes__qty',:frequency => 0.1,:url
=>{:action => 'calculate', :submit => 'cart_form'},:method
=>:get,:with => "'qty='+ element.value" %>

i dont see the parameters being passed in the dvlpmnt log. Im
obviously not doing this right. Help?
The form is for an instance variable of cart.
<% form_for @cart do |f| %>
and Record is a child model (cart has_many records) and hence the long
name of the qty field(cart_record_attributes__qty).


On Oct 11, 9:57 pm, "Xavier Noria" <[EMAIL PROTECTED]> wrote:
> On Sat, Oct 11, 2008 at 10:57 AM,Vinay<[EMAIL PROTECTED]> wrote:
> > thank you both for your replies!
> > So if we consider an invoicing application itself, what you say is
> > that i need to observe the fields rate, quantity, tax, etc (say)
> > independently, and then send in the whole form when even one field is
> > changed? If we take an invoice example, there are going to be fields
> > like invoice number, recipient, created on etc which are hardly
> > necessary for this calculation right?
>
> A general rule of thumb of mine is: Consider as a first choice the
> approach that is both easy and trivially robust.
>
> In this case, submitting the form is just a matter of setting :submit
> => 'invoice-form' in the observers.
>
> One could select the strictly needed fields and avoid sending the
> invoice number, customer ID, etc. to save a few bytes. But that
> introduces more complexity and a coupling point between the form and
> JavaScript.
>
> So the question I ask myself is: is there some measure that justifies
> that? Is the application having issues with the load or something due
> to that? The answer so far is no, so I just :submit the form.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to