[Rails] Re: Railscast 75, Observe_field and Shopping Cart

2008-11-04 Thread Vinay
has noone got a pointer? I need a fair idea of how to go about this. Any help at all will be useful. Thanks! On Oct 28, 10:26 am, Vinay <[EMAIL PROTECTED]> wrote: > Thanks Freddy! > Although what I need help is with a different issue. Let me try to > explain better. > The quantity and cost fields

[Rails] Re: Railscast 75, Observe_field and Shopping Cart

2008-10-27 Thread Vinay
Thanks Freddy! Although what I need help is with a different issue. Let me try to explain better. The quantity and cost fields are not the problem. The "Total" field is. This field is to get updated with cost*qty, as and when the user changes the qty. This is working successfully for me when i hav

[Rails] Re: Railscast 75, Observe_field and Shopping Cart

2008-10-25 Thread Freddy Andersen
The cost you should get when you get to the controller... Just send the id of the product and find the cost when you get to the controller... About the quantity, not sure about the observer but I just added a remote_form that has the quantity property: <% remote_form_for :quantity, :url => { :co

[Rails] Re: Railscast 75, Observe_field and Shopping Cart

2008-10-24 Thread Vinay
Anyone? Im sure its a common problem. I just dont know how to verbalise this better. For each record, there is a cost field, a quantity field, and a total field. "Cost" and "quantity" are observed and the corresponding "Total" field is updated via an Ajax post to a method called "Calculate" which