rails update whole index of a model with one click

Posted by mattherick on Stack Overflow See other posts from Stack Overflow or by mattherick
Published on 2010-05-23T01:38:40Z Indexed on 2010/05/23 1:40 UTC
Read the original article Hit count: 311

Filed under:
|

hello!

i have a store model, this will handle my leaflet and my shoppingcart for my shop. now i d´like to show all items added from an user to his leaflet in the index of store. in the store an user can change the quantity of the choosen items. and now i want to save that the changes of the different quantities in the database with one click on a button "update store".

so how could i implement an update over the whole index with one click? i´d like to do this with ajax and most dynamically. somebody has an idea?

i render all items into a form so far, but now i have the problem, when i submit this form only the last quantity and item id are included in the params. further i pushed every quantity into an array and i want to submit this also as a param. but i could not.

please give me some tips, will be very fine :)

mattherick

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about jquery-ajax