Saturday 15 May 2010

ruby on rails - Creating and editing my element instead of using `new` -


So, basically my 'index' action is a long list of elements of the elements in the form of a table of rail, Each one has a checkbox near it. These elements are items in a list that contain line items in a quote.

A user can like multiple checkboxes, then click a button that says "Create a new quote" Cloning items that are checked, clone them in a new table so that they differ from the bid - Can edit them in different ways.

I think that when this list is really long, then 6000 records say that to load the horrible long list, so I want to put a score on the page, but! My checkbox will not work because users change the page, because they will move away.

Additionally there is no way to get the user back to this page so that they can add more items for the quote.

My first thought was that when they browse this "index page and basically meet the user, then create a new element while editing the quote".

Any ideas on this implementation? I stuck a little bit on how to start implementing it

This classic shopping cart type has trouble. You may want to read the session along with the session on implementing those people in the Rail. The simple example is to use a user's session. You can either construct a class by explaining the argument, or simply use a hash or array to catch that AIDS. So when the user clicks on "Start new quote" you can set var to clear var in your session:

  session [: new_quote_items] = []  

Then when they check the item, you can get a link to add them to the bid. You can then place those IDs in the array. On the page display of potential quotation items, you can show the user what to check, and then add / remove the ID from this list. Then when a user is done, they can click on a full link which will take ID from the session and now you have the quote.


No comments:

Post a Comment